How to add Google Analytics to GitHub projects.
How to add Google Analytics to GitHub projects.

As I mentioned in a previous post we are prepairing to migrate our Bazaar repositories to Git, or more precisely to GitHub. This migration also heralds the Open Source releases of many of the core technologies we’ve been developing at Flight Data Services for the last few years.

I want to track visits for our GitHub projects. A bit of Googling turned up githalytics which enables you to track visits and page views for your GitHub projects using [](Google Analytics).

To use it, create a new Google Analytics property ID for your GitHub project, head over to and complete the web form. You’ll be provided a Markdown snippet to insert in your projects It will look something like this:

[![ alpha]( "")](

Add the snippet to and push the changes. When someone visits your GitHub project page, the visit will be tracked. Great!

However, we write all our documentation using reStructuredText. But after a quick Twitter and email exchange with Dimitrios from githalytics and I had a reStructuredText snippet. It looks something like this:


Same drill, except add this snippet to README.rst and push the changes.

So there you have it, Google Analytics tracking of your GitHub project landing page. If you have more than one project, create a Google Analytics property ID and githalytics tracking snippet for each project.