
Google Analytics for GitHub - orrsella
https://github.com/igrigorik/ga-beacon
======
ABS
ouch, GitHub has just announced Traffic Analytics

[https://github.com/blog/1672-introducing-github-traffic-
anal...](https://github.com/blog/1672-introducing-github-traffic-analytics)

~~~
igrigorik
If by ouch, you mean _AWESOME_. Then I'm totally with you! Wohoo!

~~~
ABS
ouch because it makes this submission obsolete in a record 9 hours.

Agreed on the actual feature :-)

------
vtuulos
As a founder of another service, [http://bitdeli.com](http://bitdeli.com),
that provides analytics for GitHub, I would be curious to hear what kind of
analytics would you like to get for your repos?

There are a number of GitHub-specific metrics that we could add, like being
able to track the number of forks / stars.

We will be adding weekly email reports soon - what metrics would you like to
see included?

------
nfoz
Can everyone please just stop using google analytics

Webserver logs give you all the information you should want about how users
look at your page, and don't violate your users' privacy by notifying a third-
party advertising company about their browsing habits.

~~~
jaredsohn
I don't think github gives users access to the logs. Also, Google Analytics
provides a more convenient way of looking through the data, more information,
and alerts. It also lets you view the data for multiple sites at once.

~~~
nfoz
Github _could_ provide their users access to those logs.

And if convenient log analyzers do not exist in 2014, that sounds like a great
project to put on.... Github.

~~~
konklone
I've heard good things about self-hosted, open source Piwik:
[http://piwik.org/](http://piwik.org/)

------
est
This is a cool hack taking advantage of Measurement Protocol, however please
note that only the page with a rendered readme.md can work

e.g. this page won't work

[https://github.com/igrigorik/ga-
beacon/tree/master/static](https://github.com/igrigorik/ga-
beacon/tree/master/static)

~~~
beaumartinez
Add a readme to that dir and it will.

------
nodesocket
GitHub should just offer to buy this project, and integrate Analytics
natively.

~~~
igrigorik
No need to buy anything, it's an MIT-licensed project, and a trivial
implementation under the hood to boot. If I wasn't learning Go while writing
it, I think it would take all of 5-10 minutes to replicate (including
deploying to prod)... :-)

What _I wish_ GitHub would do is allow us to specify our own GA profile in
project settings and just add an extra two lines of JavaScript in their pages
to beacon the right metrics directly to GA. They're already using GA on their
pages, so adding an additional profile is trivial. [1]

A proper GA integration would eliminate the need to proxy requests, and give
us (repo owners) more metrics: I'm most interested in referral information -
aka, how are people finding my repo. Also, it would enable analytics on all
pages (e.g. source files, etc).

If anyone from GH is reading this... Please? :-)

[1]
[https://developers.google.com/analytics/devguides/collection...](https://developers.google.com/analytics/devguides/collection/gajs/#MultipleCommands)

~~~
jbarnette
We'll see what we can do. ;)

~~~
igrigorik
You guys are awesome. Kudos!

------
alagu
This is great! I've started using this.

Since this is being hosted on appspot and you'd be proxying significant
traffic - I think you would cross your limits soon.

------
ozh
Alternatives: [http://bitdeli.com/](http://bitdeli.com/) and
[http://githalytics.com/](http://githalytics.com/)

Really a shame Github doesn't allow simple inclusion of a Google Analytics
tag.

~~~
ericraio
Maybe not the tag itself but a Google Analytics UA code.

