Skip to main content

Configuring GrowthBook to work with Google Analytics - GA4

GrowthBook connects to Google Analytics (GA4) via BigQuery. This process is straight forward, and outlined below. You can also find Google's documentation on how to create this link here.

1. Create a BigQuery Project (if you don't have one)

If you don't have a BigQuery project, you'll need to create one. Go to your Google Cloud Console and create a new project:

GA4 - BigQuery create project

Click on Create new project from the right and give your project a name.

GA4 - BigQuery create project

Once created, you'll be redirected to the BigQuery dashboard.

GA4 BigQuery new project dashboard

If you created a new project, the BigQuery API is automatically enabled. Otherwise, you'll need to enable it manually here

note

If you are just testing GrowthBook with GA4 out, you can use the sandbox project that Google provides for free. When you create a new cloud project the sandbox should be automatically enabled. You can find more information about the sandbox here.

2. Connect Google Analytics to BigQuery

Log into your Google Analytics account and navigate to the Admin section. From there, make sure you have selected the right property, and scroll down to Product Links section. Click on the menu named BigQuery Links

GA4 BigQuery new project dashboard

Click on the Link button. This will open a menu that allows you select the project. Select on the Choose a BigQuery Project link.

GA4 BigQuery new project dashboard

Select the project you wish to send your GA4 data to:

GA4 BigQuery connect to project

Then click next

GA4 BigQuery connected to project

On the next step you'll be presented with some options about the connection.

GA4 BigQuery link options

Here you can choose the frequency of data updates, either daily or streaming. To use Streaming, you'll need a BigQuery account with billing info added. Depending on your use case, daily updates may be sufficient.

On the final step you'll be asked to confirm your choices. When finished, you should see something like this, verifying that the connection was successful.

GA4 BigQuery successfully connected

And then your BigQuery link will show up on the listing page:

GA4 BigQuery successfully connected

3. Configure BigQuery for GrowthBook

You'll need to give GrowthBook some permissions to your BigQuery project so that we can access the data. We have created a guide just for this, which you can find here

4. Connect GrowthBook to BigQuery

Within GrowthBook, navigate to the Analysis section, and then click on the Data Sources page. Add a new data source, and select Google Analytics (GA4).

GrowthBook connect to GA4GrowthBook connect to GA4

Then add your BigQuery connection info. GrowthBook will pre-populate the SQL queries required to use your GA4 data. You can also add a custom SQL query if you want to use a different table or filter the data in some way as you like.

Once connected, you'll be able to add any additional metrics or dimensions, and then you can use your GA4 data for your experiments.