Skip to content
This repository was archived by the owner on Dec 8, 2017. It is now read-only.

18F/analytics-proxy

Repository files navigation

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'
        }
    },

About

Experimental proxy to make GA data public.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •