Reputation: 6409
Just wondering if there is any Analytics type things available for github. I'd be curious to know who is viewing / using my code, if anyone...
Upvotes: 27
Views: 21893
Reputation: 18194
You would get all the tracking info under insights tabs > traffic subtab(on left). The url should look like this: https://github.com/<username>/<reponame>/graphs/traffic
and plots should look like these:
PS: link to the example repo
Upvotes: 0
Reputation: 35741
(disclaimer: I started building this)
https://github.com/jgehrcke/github-repo-stats is a GitHub Action that periodically queries data about total/unique views, total/unique clones (and more, such as stargazers, forks, ...) from the GitHub HTTP API. It persists the data, and generates an HTML report with various charts. The report is also generated as a PDF doc (with vector graphics! : ))
A screenshot of a part of the report: https://i.sstatic.net/xmbbo.png
A demo report is linked in the main README at https://github.com/jgehrcke/github-repo-stats.
Upvotes: 0
Reputation: 1324258
Update August 2014:
The Traffic graph now includes the number of clones: See "Clone Graphs"
The 2020 documentation states:
Anyone with push access to a repository can view its traffic, including full clones (not fetches), visitors from the past 14 days, referring sites, and popular content in the traffic graph.
All the information are mainly available through the (newly refurbished) User page.
But you can query some of those data through the Github API for users, as described in "How I built my blog in one day"
I wanted to have a button with my number of GitHub followers and GitHub repositories that was dynamic.
GitHub provides an api of each users information:
jQuery(document).ready(function() {
$('#gf').text('GitHub Followers');
$('#gfr').text('GitHub Repos');
$.get('https://api.github.com/users/erjjones', function(res) {
var obj = jQuery.parseJSON(res);
if(typeof obj.followers != 'undefined')
{
$('#gf').text(obj.followers + ' GitHub Followers');
$('#gfr').text(obj.public_repos + ' GitHub Repos');
}
});
});
Upvotes: 20
Reputation: 27911
All analytics for a GitHub repository is available at
https://github.com/<username>/<reponame>/graphs/traffic
Upvotes: 40