Git Product home page Git Product logo

gaforgithub's Introduction

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.

Motivation

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.

Attention

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.).

Instructions

  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 https://yourfunctionname.azurewebsites.net)
  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](https://YYYYYY.azurewebsites.net/api?repo=XXXXXXXX)](https://github.com/dgkanatsios/gaforgithub)

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

![](https://YYYYYY.azurewebsites.net/api?repo=XXXXXXXX&empty)

Cost

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

Inspiration

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

gaforgithub's People

Contributors

dgkanatsios avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

saschadittmann

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.