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.
- ✓ 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
- A Python script fetches GitHub traffic data using the GitHub API
- Data includes:
- Views
- Clones
- Referrers
- Popular Paths
- Data is merged with existing history (no duplicates)
- Snapshots are stored over time to build a history
- The dashboard visualizes and filters this data
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)
- Install dependencies:
pip install requests- Create
config.json:
{
"token": "YOUR_GITHUB_TOKEN"
}Run the tracker:
python tracker.pyThe 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
Run daily:
0 0 * * * python3 /path/to/tracker.pyRegular execution ensures no data loss
- 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
- NEVER push
config.json - Use
.gitignoreto ignore sensitive and generated files