Search
Contact salesTry for free

How to export Google Universal Analytics raw data to BigQuery

Ivanna Holubovska

Ivanna Holubovska

Author
Updated
Oct 24, 2022

Before Google released Google Analytics 4, only GA 360 users had the ability to send raw events from Google Analytics to BigQuery. Because GA 360 is not free (the price starts from $70 000 per year), not all businesses used the raw data exploring feature.

If you use GA4, you can follow official documentation from Google on how to set up BigQuery Export.

For Google Universal Analytics, Google still has not provided free options to export raw data to BigQuery or any other database for that matter. But what if you don’t have plans to migrate to GA4 and want to get the benefits of BigQuery raw data? I decided to solve this question with GTM Server Side tagging and created this how-to article for you.

How I send GA events from browser to BigQuery table

1. gtag.js sends GA event to Google Tag Manager Server container.

2. Universal Analytics client gets the request and triggers JSON HTTP Request Tag.

3. JSON HTTP Request Tag sends data to the URL of the Request To Google Cloud Storage function.

4. GCS function saves data on your GCP Storage bucket.

5. Use BigQuery GCP table type to perform data querying.

Things that you should know about this flow before you start to go thru how-to

1. BigQuery can use Google Cloud Storage bucket as a table. More info about this feature can be found in this official documentation.

2. You can store on GCS 5 GB of data for free. One GA request is near 1 KB, so that’s 5 242 880 requests. More details about GCS pricing can be found on the pricing page.

3. The First 2 million requests to Cloud Functions are free, so that’s more than enough for our task. But bear in mind that you need to check usage and pricing if you already use it.

author

Ivanna Holubovska

Author

Content contributor at Stape.io, focusing on server-side tracking, digital marketing, and innovative solutions to optimize online business performance. optimize online business performance.

Comments

Try Stape for all things server-side

What’s going on?

Where are we going?

Attention!
This is a stand-up dog zone.