/ga-bq

Stream raw hit-level Google Analytics data into BigQuery

Primary LanguagePython

Google Analytics -> BigQuery streaming

Stream raw hit-level Google Analytics data into BigQuery

##Installation

  1. Create new project here https://console.developers.google.com/project
  2. Create new dataset in Google BigQuery https://bigquery.cloud.google.com
  3. Download and install Google App Engine python SDK https://cloud.google.com/appengine/downloads
  4. git clone https://github.com/lnklnklnk/ga-bq.git
  5. Create new app from source in Google SDK
  6. Add app-id in app.yaml
  7. Change gifPath in js/gabq.js to [your-project].appspot.com/collect
  8. Set app_id, dataset_id, table_id in bqloader.py
  9. Deploy application
  10. Visit [your-app].appspot.com/tasks/create_bq_table to create BigQuery table
  11. Include plugin on your website. Add line: <script async src="http://[your-app].appspot.com/js/gabq.js"></script> after GA code and ga('require', 'gabqplugin'); after ga('create',..)
  12. Now you raw GA data collects in BigQuery table

Note: Ecomerce data is currently not supported, it will be added soon