Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Traffic Archiver

Python JavaScript Tracker.py Status Maintenance GitHub license Languages Language Count License

Overview

A lightweight tool to archive GitHub repository traffic data beyond GitHub's 14-day limit. It continuously collects and stores data to build long-term analytics and provides a local dashboard with time-based filtering.

Features

  • ✓ Stores GitHub traffic beyond 14 days
  • ✓ Tracks views and clones over time
  • ✓ Preserves referrers and popular paths
  • ✓ Time-range filtering ("time machine" dashboard)
  • ✓ No external database required

How It Works

  1. A Python script fetches GitHub traffic data using the GitHub API
  2. Data includes:
    • Views
    • Clones
    • Referrers
    • Popular Paths
  3. Data is merged with existing history (no duplicates)
  4. Snapshots are stored over time to build a history
  5. The dashboard visualizes and filters this data

Folder Structure

github-insights-archiver/
|──tracker.py      <- Main Script
|──config.json     <- Github Token
|──Dashboard/
   |──index.html      <- Main Dashboard
   |──style.css       <- UI Style
   |──app.js          <- Data Logic
   |──data (traffic.json, snapshots.json, referrers_history.json and paths_history.json)

Setup

  1. Install dependencies:
pip install requests
  1. Create config.json:
{
  "token": "YOUR_GITHUB_TOKEN"
}

Usage

Run the tracker:

python tracker.py

The script will:

  • Fetch latest data
  • Merge with history
  • Update data inside Dashboard/

To view dashboard:

  • Serve Dashboard/ via Nginx or open index.html
  • Use date filters to explore history

Automation (Cron)

Run daily:

0 0 * * * python3 /path/to/tracker.py

Regular execution ensures no data loss

Notes

  • GitHub limits traffic to 14 days
  • This tool builds a persistent history
  • Referrers and paths are snapshot based (preserved over time)
  • Dashboard supports time-range analysis

Security

  • NEVER push config.json
  • Use .gitignore to ignore sensitive and generated files

About

Archive GitHub repository traffic insights (views, clones, referrers, and paths) beyond GitHub's 14-day limit using the GitHub API.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages