Is it possible to track and view/analyze traffic to a GitHub repository (possibly with referrers information) for a period longer than 14 days? That seems to be the longest period that I can see via GitHub "Traffic" graph.

From another answer, suggesting to use badges and some third party service, I navigated to a blogpost, claiming that Github now caches images from READMEs, and thus this solution won't work either, reportedly.

  • Sounds like a simple fix with a little IFTTT ifttt.com/recipes?channel=github&page=1 Commented May 21, 2014 at 21:41
  • @designerWhoCodes: would you care to elaborate? at the link you provided, I see some 200 "github recipes", but after reading through the first few pages I can't seem to find one to mention anything like "traffic" or "visitors"?
    – akavel
    Commented May 23, 2014 at 10:55

10 Answers 10


Not possible as of 2015-05-19

I wrote this message https://github.com/isaacs/github/issues/399 to https://github.com/contact and Ivan Žužak replied by email:

Not possible currently, but thanks for your +1 -- I'll pass it along to the team.

confirming it is not currently possible.

A better approch might be to enable Google analytics on GitHub as proposed at: https://github.com/isaacs/github/issues/446


This can be done using the GitHub REST API.

Two projects using this are github-traffic-stats (exports to csv) and GitHubTelemetryParsor (SQL MS Visual Studio project).


I just built Repohistory. It is an open-source dashboard for tracking GitHub repo traffic history longer than 14 days, with a sleek UI for comprehensive long-term data insights.



I made a web app to record repo traffic, clones, referrers and other analytics data. Welcome to try it out

enter image description here

  • Error 502 Bad gateway when I try to login. Commented Sep 21, 2021 at 23:32

I have built https://github.com/jgehrcke/github-repo-stats. Every day, it generates a nice HTML and PDF report and from my point of view the most important part is that the data stays in GitHub. You don't need a cloud service to integrate this with. No S3 or so.

This is an all-in-GitHub solution, triggered to act periodically (once per day) via GitHub actions.

The time series data is simply stored in a "data repository" (where you run this action in), with transparent evolution of history.

The HTML report can be exposed via GitHub Pages. A demo is linked in the README of https://github.com/jgehrcke/github-repo-stats.

An example screenshot:

enter image description here


Tracking pixels can do the trick, but you cannot filter out spam requests and cannot count unique visitors count. The only way - daily download and aggregate repository traffic data. It's not that hard, but have some edge cases.

I've made a public service Ÿ HŸPE which could do that job for you. It aggregates repository traffic, clones, referrers & stars, user profile views & followages.

Y HYPE GitHub Traffic Page


Here's also an automated solution that uses Azure LogicApps to pull the data from the GitHub API and store it in table storage.



I wrote a couple of bash scripts that use GitHub traffic API. One very simple shell script uses crontab to schedule the download of GitHub traffic statistics in plain text from your GitHub repositories. Another shell script prints the text lines to add to crontab and sets up the directories for GitHub traffic statistics. It takes minutes to setup but weeks to get enough data. At this point you can process the data with any tools you wish. I created a third script that parses the GitHub traffic and creates two markdown tables (clone, views).

It solves my challenge. It may help you.



Answered here:


Port into GitHub composite action to reuse workflow code base.


With additional features:

  1. Can count traffic clones or/and views.
  2. Can use GitHub composite action to reuse workflow code base: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action

GitHub workflow file example:



Happy to see lots of unique solutions out here. Adding one more. My solution uses Google Apps Script with Google Sheet to automate this stuff. You can track as many repos as you want in a single document using multiple sheets. Also generates a good looking graph for each Repo.

Code Url: https://gist.github.com/Nirav-Madhani/daee9a3b5173b786be85049a984fb927

Full Tutorial: https://nirav-madhani.netlify.app/post/github-stats-tracking/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.