A github traffic stats (referers, top pages, views, clones etc) for your github repo's using a github token and github api
A Claude.ai generated standalone, javascript based html page that grabs the traffic information (referrers, popular content, views and clones) of your own created github projects and displays it per repository and as an overview across all repositories. Just provide a github token and it will fetch all your own created repo’s (forks are skipped unless you tick “include forks”) and display their traffic data.
All tables can be sorted by clicking a column header, and the sidebar can be filtered to quickly find a repo.
The charts can show the last 7 days, 14 days, 30 days, 90 days, 12 months or all stored history, grouped per day, week (starting on Monday) or month. Below each chart the views and clones total for the selected period is shown. When a period other than 14 days is selected, the repository table gets extra views and clones columns for that period, so you can sort your repos on e.g. the last 90 days. When grouping per week or month, the unique visitors line is the sum of the daily unique visitors, as GitHub doesn’t provide unique visitors per week or month. The filters are remembered in the browser.
When refreshed the app shows little red or green difference information compared to the previous refresh, for totals, per-repo numbers and referrers. Referrers that weren’t there on the previous refresh are marked as “new”.
GitHub only keeps traffic data for the last 14 days. Every refresh stores the daily views and clones in the browser, so the longer periods (30 days, 90 days, 12 months and all history) fill up over time as long as you refresh at least once every 14 days. If the stored history doesn’t cover the whole selected period yet, a note below the chart shows how far back it goes. Use “Export history” to save this data to a json file as a backup and “Import” to merge it back in, for example in another browser or on another PC. Referrers and popular content are only available as the current 14 day top 10 per repo, so those are not kept as history.
The traffic API requires push access to a repository, so this only works for your own repos. Use a classic token with the repo scope (or public_repo for public repos only), or a fine-grained token with “Administration: read” repository permission.
The page is a completely self driven javascript application. The github token is stored locally in your browser and is only sent to the github api. The fetched data and the history are also only stored locally in your browser. The only external resource loaded is the Chart.js library from cdnjs to draw the charts. You can view or download the code from the github repo itself to verify this.
