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 May 21 '14 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
    May 23 '14 at 10:55

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

  • 1
    OK, well that was a long time ago .... why is this not a thing yet? I mean seriously, it can't be that hard to allow manipulation of what should be a single variable to get more time in view
    – SpYk3HH
    Apr 20 '16 at 14:33

This can be done using the official GitHub traffic API.

Solutions have been implemented in github-traffic-stats (exports to csv, views only) and GitHubTelemetryParsor (SQL MS Visual Studio project).

  • Is this question or answer?
    – serenesat
    Feb 24 '17 at 18:20
  • 1
    an answer: by pulling the stats regularly with the stated github-projects you can collect it regularly (e.g. via crontab) and therefore have a history longer than 14days
    – hirsch
    Feb 25 '17 at 18:40

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. Sep 21 at 23:32

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.



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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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