This repository contains SQL code to export data from Google Analytics in BigQuery, using standard or legacy SQL.
Both SQL queries below transform Google Analytics BigQuery nested data into flat hit level data with a timestamp making data easy to analyze using tools like Tableau, SAS, R, etc.
- google-analytics-bigquery-legacy-export.sql
- google-analytics-bigquery-standard-export.sql
- Open the SQL and configure the table(s) to export
- Output the results to another table and export to Google Storage
- Download the CSVs, done!