This repository has been archived by the owner. It is now read-only.
Experimental proxy to make GA data public.
Python JavaScript HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
chart_examples
.gitignore
CONTRIBUTING.md
LICENSE.md
README.md
analytics_proxy.py
app_config.py
reports.py
requirements.txt
util_functions.py

README.md

Analytics Proxy

Analytics Proxy allows you to publicly share Google Analytics reporting data. It was partially inspired by Google Analytics superProxy; however, unlike Google Analytics superProxy it doesn’t need to be deployed on Google App Engine

Setup

Requirements

Google Analytics Service Account

  1. Create Google API service account and take not of the client email.
  2. Download the P12 private key file and place it in the analytics-proxy folder.
  3. Make sure to add the client email to the Google Analytics account.

Install Redis

# Mac OS
brew install redis
# Ubuntu
sudo apt-get install redis-server

Start Redis

redis-server

Env Variables

export APP_SETTINGS="app_config.DevelopmentConfig"
export CLIENT_EMAIL=<<GA CLIENT_EMAIL>>
export GA_P12_KEY=<<Location of P12 Key>>

Modify reports.py to meet reporting needs.

    {
        'report_name': 'top-sources',
        'refresh_rate': 60,
        'query': {
            'ids': 'ga:<<your ga:ID>>',
            'dimensions': 'ga:source',
            'metrics': 'ga:sessions',
            'start_date': '2013-11-20',
            'end_date': '2015-11-30'
        }
    },