unofficial Google Analytics tracking for GitHub repositories using Azure Functions
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Software License PRs Welcome

Unofficial Google Analytics tracking for GitHub projects

This is an unofficial Google Analytics for GitHub repositories tracking using Azure Functions and written in Node.js. You can use this to track pageviews in all pages that contain Markdown, like READMEs, wikis etc.


GitHub has a mechanism by which you can see tracking information about your repositories, you can read about it here. However, it hosts data only for the last 14 days and there is no real time information.


GitHub uses camo to cache and serve images (details), so (a) tracking may not be accurate and (b) user details are hidden (IP, referer, etc.).


  1. Click here to visit Google Analytics and create a new account
  2. When you are done, copy your Tracking ID (should be in the format UA-XXXX-Y)
  3. Click the button below to deploy the project in your Azure subscription

  1. When the deployment is completed, copy your Functions URL (should be something like
  2. Edit your README files in your repos that you want to track (or any files that contain markdown) and insert the necessary code.

First, change YYYYYY to your Azure Function's URL. Then, change XXXXXXXX to a distinctive name to use in order to track this specific page. Might be the name of your repo or whatever you like. If you want to display a button use this code:

[![unofficial Google Analytics for GitHub](](

If you do not want to display the button, use this code:



The deployment uses Azure Functions' Consumption Plan so you'll see that it's really cheap to host it for your projects.


Inspired by igrorik's solution here that works with Go language and Google App Engine.