This repository contains SQL code used in web analytics.
This SQL query transforms 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. #####Instructions:
- Select either timestamp or UNIX time as you prefer by commenting either line #2 or line #3
- Select only the appropriate fields. The table may contain more than 200 columns, select only the variables you are capturing/using, namely custom variables, custom dimensions, enhanced ecommerce, etc. Please note this query contains fields that don't exist in older datasets, you will have to adapt accordingly.
- Output the results to another table and export to Google Storage
- Download the CSV, done!