Scroll to top
en de

Working with data from GA4 using Google BigQuery

One of the main purposes for setting up Google Analytics 4, or in that regard any form of web analytics, if not the sole purpose is actually working with the resulting data. There is a myriad of use cases, be they a baseline monitoring of traffic, understanding which sources drive visits to the page, to conversion attribution in conjunction with marketing data or getting to know your users better (to the degree that consent allows this). With Google Analytics 4 we are presented with a feature that will allow marketers with the right knowledge or co-workers in their data division to access a lot more information than was previously possible by integrating Google Analytics 4 data directly into Google BigQuery.

Where the user interface of GA4 might seem limited in options to analyze data, using raw data in BigQuery allows for lots of different analyses, some of which we will feature in a later article.

What is BigQuery?

Google BigQuery (BQ) is Google’s data warehouse offering. It integrates well with lots of other products Google offers in this sphere like Google Cloud Storage (basically a cloud hard drive), tools for running code against data (Cloud Functions) and a broad assortment of tools for machine learning, data science and other related purposes.

In order to store data from Google Analytics in BigQuery to analyze it with SQL queries, you need to set up a BigQuery instance. There are multiple approaches on how to structure your data on Google’s platform, something we cannot dive into here in every detail but as a general recommendation, you want to start setting up a cloud project for your organization if there isn’t already one setup. You’ll find a really concise and straightforward guide to get started on BigQuery in Google’s documentation.

How to transfer data to BigQuery from Google Analytics 4?

Provided you have your cloud project ready and made yourself familiar with BigQuery, you would want to have access to raw data from Google Analytics 4. Fortunately for us, Google has made the whole process of transferring data an easy four step process:

  1. Open your Google Analytics account and then in the “Admin” menu, make sure you select the property for which you want to sync data to BigQuery
  1. Click on “BigQuery Links” which will open a new view that allows you to click on “Link”
  1. Then select the project you want to send your data to. Make sure that the BigQuery API is activated in order to transfer data. This is covered in the documentation link we shared above. Google will then allow you to select your data location. For us this is ideally Frankfurt (for an EU server in Germany) but your requirements might differ depending on your legal requirements. 
  1. Finally it asks you to specify the data streams to consider in data transfer and whether to sync once daily or real-time. Some information on that can be found here: https://support.google.com/analytics/answer/9358801?hl=en

As a last step you only have to accept your configuration and then starting within a few hours or the next day latest, data will appear. Be aware that this export does not work retroactively so if you do not want to lose out on having this information at the tip of your fingers, make sure to directly set this up after reading this article. And that’s it. Make sure you check into your BigQuery environment in the next days after the setup to verify data going in and comparing numbers with what you see in Google Analytics user interface to assess data quality. 

If you still feel uncomfortable implementing this or have questions around GA4, BigQuery and marketing data in general, do not hesitate to reach out to us and we will be happy to help and jump on a call with you.

Related posts