GA4 and BigQuery Introduction

Discover the power of GA4 and BigQuery integration to unlock advanced analytics capabilities. Learn how combining Google Analytics 4 with BigQuery allows for in-depth data analysis, custom reporting, and data-driven decision-making

Google has introduced a groundbreaking new approach to measuring app and web analytics with Google Analytics 4 (GA4). Though most of us at the time of writing this are dreading the move from Universal Analytics to GA4, this innovation marks a significant shift for both app and web analytics.

It’s not all bad news though and one of the most exciting features in GA4 is undoubtedly BigQuery integration. All GA4 property owners can now enable data export to BigQuery and leverage the raw event data collected from their websites and apps.

In the previous version of Google Analytics (Universal Analytics), this integration was exclusive to GA360 enterprise properties. However, GA4 makes data export available for free to everyone; you only pay for actual data storage and querying if you exceed Google Cloud’s free tier limits. Your credit card will only be charged after 1 TB of querying per month and 10 GB of storage.

You can also use the BigQuery sandbox environment without a credit card, but be aware that your data tables may expire after 60 days.

Why should you enable BigQuery linking for GA4?

Some reasons include:

  • Store your data in BigQuery (Google Cloud) and/or send it to your data warehouse in other clouds, such as AWS, Azure, or Snowflake
  • Combine and enrich your data with other marketing/CRM/contextual data
  • Visualize your data using tools like Data Studio, Tableau, Looker, or PowerBI
  • Perform advanced data analysis
  • Use your data as input for (machine learning) models

Don’t waste any time; start sending data immediately, as there’s no backfill for historical data already collected in GA4.

Follow these steps to link Google Analytics 4 to BigQuery

How to Set Up BigQuery Linking in Your Google Analytics 4 Property (GA4) There’s no backfill, so start collecting data now. Learn how to set up BigQuery export from Google Analytics 4 (GA4).

To set up GA4 and BigQuery integration from scratch, follow these step-by-step instructions:

Set up a Google Cloud Platform (GCP) account:

  1. Go to https://console.cloud.google.com/ and sign in with your Google account.
  2. Create a new project by clicking the “Select a project” dropdown menu in the top-right corner, then click “New Project.”
  3. Enter a project name, select a billing account, and click “Create.”

Enable BigQuery API:

  1. From the GCP console, click the hamburger menu in the top-left corner and select “APIs & Services” > “Library.”
  2. Search for “BigQuery API” and click on the result.
  3. Click “Enable” to activate the BigQuery API for your project.

Set up a BigQuery dataset:

  1. In the GCP console, navigate to “BigQuery” from the left-hand menu.
  2. Click on your project name in the left sidebar, then click “Create Dataset.”
  3. Enter a dataset ID (e.g., “ga4_data”), select a data location, and configure other settings as needed. Click “Create dataset.”
Create Dataset BigQuery

Set up Google Analytics 4 (GA4) property:

  1. Go to https://analytics.google.com/ and sign in with your Google account.
  2. If you don’t have a GA4 property yet, create one by following the on-screen instructions.
  3. Once your GA4 property is created, navigate to the property’s “Admin” panel by clicking the gear icon in the bottom-left corner.
GA4 Account setup

Link GA4 to BigQuery:

  1. In the GA4 “Admin” panel, click “Data Streams” under the “Data” column.
  2. Select the data stream you want to link (e.g., web or app) and click the “Link to BigQuery” button.
  3. Choose the GCP project and dataset you created earlier, then click “Next.”
  4. Choose “Daily” or “Streaming” export frequency and click “Next.”
  5. Review the linking settings and click “Submit” to start the integration.
Link-BigQuery-in-GA4

Check the data in BigQuery:

After linking GA4 to BigQuery, it may take a few hours for the data to appear in BigQuery. Once the data starts flowing, you can query it in the BigQuery console

  • Go to the GCP console and navigate to “BigQuery” from the left-hand menu.
  • Locate your dataset (e.g., “ga4_data”) in the left sidebar and click on it to view the tables.
  • Click on a table to preview the data or click “Query Table” to write and execute SQL queries.
Check Data in BigQuery

Why you should set-up GA4 and BigQuery now?

Remember that GA4 to BigQuery integration doesn’t provide historical data backfill. Once the integration is set up, only new data will be exported to BigQuery.
Now that you’ve set up GA4 to BigQuery integration, you can start analyzing your raw GA4 data, join it with other datasets, create visualizations with tools like Data Studio, and apply advanced analytics or machine learning models to your data.

We hope this has given you a good Introduction to GA4 and BigQuery and why you should set-up GA4 to BigQuery now?

Leave a Reply

Your email address will not be published. Required fields are marked *