Connect GA4 with Bigquery
Prerequisites:
- A GCP account with billing enabled.
- A Bigquery project to store the GA4 data.
Steps:
-
Log into your GA4 property and then click on ‘Admin’ under the left-hand reporting menu.
-
Click on ‘BigQuery Links’ under ‘Product Links’:
-
Click on the ‘Link’ button:
Click the ‘Choose a BigQuery project’ button:
-
Select the Bigquery project where you want to send your GA4 data, and then click on the ‘Confirm’ button.
Note: You can link only one Bigquery project at a time to a GA4 property.
- Select your data location from the drop-down menu and click on the ‘Next’ button.
-
Click on ‘Configure data streams and events’ if you want to export only particular data streams and events(optional):
-
Click on Apply
Note: By default, all data streams and events are selected for export to Bigquery.
-
Click on the checkbox ‘Include advertising identifiers for mobile app stream’ (optional)
Use this option if you have a mobile app and you want to export mobile advertiser identifiers to your Bigquery project:
-
Select the frequency of your data import to BigQuery and then click the ‘Next button:
Select both ‘Daily’ and ‘Streaming’ frequencies:
- Review your GA4 Bigquery integration setup and then click on the ‘Submit button:
You should now see a screen like the one below:
Now the GA4 project is successfully linked to your BigQuery project.
Enable and configure the BigQuery API:
- Navigate to https://console.cloud.google.com/apis/dashboard
- Make sure the Bigquery project for GA4 is selected.
-
Click on the ‘Enable APIs and Services’ Button:
You will now see a screen like below:
-
Search for ‘bigquery’ and then click on ‘Bigquery API’ auto-suggestion:
-
Click on the ‘BigQuery API’ search result to enable the API:
-
Click on the ‘Manage’ button:
-
Click on the ‘Create Credentials’ button at the top right-hand side of your screen to use the API:
-
Make sure that ‘BigQuery API’ is selected under the ‘Select an API’ drop-down menu:
-
Select ‘Application Data’ to create a firebase service account.
The firebase service account will be used to export GA4 data to Bigquery.
-
Scroll down, select ‘No, I am not using them’ and then click on the ‘Next’ button:
-
Enter firebase-measurement@system.gserviceaccount.com as the service account name:
-
Click on the ‘Create and Continue’ button.
-
Grant this service account access to the project and then click on the ‘Continue’ button.
The default role is ‘Owner’. But you can change it if you want.
-
Grant access to users or groups that need to perform actions as this service account and then click on the ‘Done’
Or if you do not want to grant access then click ‘Done’.
You should now see a screen like the one below, which shows the listing of your new service account:
Now the BigQuery API has been successfully set up and configured.
- Please send a note to your SprigHub account representative letting them know this action is complete.
Note, it will take about 24 hours for your GA4 data to be available in your Bigquery project.
To find the GA4 data in Bigquery:
- Navigate to yoru Bigquery account: https://console.cloud.google.com/bigquery
-
Make sure that the project used for collecting the GA4 data is selected.
-
Click on the project ID of the project which collects GA4 data:
-
You should now be able to see a data set named in the following format:
“analytics_<property_id>”.
For each GA4 property linked to Bigquery, a single dataset named “analytics_<property_id>” is added to your Bigquery project.
Property ID refers to your Analytics Property ID, which you can find in the property settings for your GA4 property:
Leave a Reply