Google BigQuery is a cloud data warehouse that allows you to run high volume data in just a few seconds.
BigQuery provides the opportunity to conduct an in-depth analysis of business performance and user interactions. Now, with Google Analytics 4 (GA4) properties, you can get a more detailed analysis using an event-driven data model designed to allow more flexibility while collecting data from apps and web properties.
Why use BigQuery for your Google Analytics 4 property?
Connecting Google Analytics 4 with BigQuery is completely free of charge. Yes, you heard it right, there are no charges on exporting data from a Google Analytics 4 property to BigQuery. You can also export to a free instance of BigQuery called BigQuery Sandbox.
Now, you can really take this opportunity to the next level and go beyond the reporting interface of GA4, with unlimited advanced analytics options.
Here are a few of the advantages below:
- No data sampling.
- Export all of your custom event parameters and dimensions.
- Connect Google Analytics 4 data with third-party API’s.
- Push data from BigQuery to a wide range of visualization tools like Google Data Studio, Tableau, Power BI and Qlik.
- Data correction options.
- Custom channel grouping.
Follow the steps below to connect Google Analytics 4 with BigQuery and then send the GA data to it:
Step-1: Navigate to your BigQuery account: https://console.cloud.google.com/bigquery
Step-2: At the top of your screen click on the drop-down menu:
Step-3: Click on the ‘New Project’ button:
We are going to use this new project for collecting and querying Google Analytics 4 data into BigQuery.
Step-4: Name your new project and then click on the ‘Create’ button:
Step-5: At the top of your screen click on the drop-down menu:
Step-6: Click on the name of the project you want to switch to (in our case ‘DBRT GA4’):
Congratulations! You are now in the ‘DBRT GA4’ project.
You will know that you are in the right project because the project name will appear at the top of your screen:
Step-7: Log in to your Google Analytics 4 property and click on ‘Admin’ under the left-hand side reporting menu.
Step-8: Click on ‘BigQuery Linking’ under ‘Product Linking’:
Step-9: Click on the ‘Link’ button:
Step-10: Click on ‘Choose a BigQuery project’:
Step-11: Select the BigQuery project where you want to send your GA4 data and then click on the ‘Confirm’ button. In our case that project is ‘DBRT GA4’:
Step-12: Select your data location and then click on the ‘Next’ button.
Data location is the cloud region where your data is stored.
Step-13: ‘Edit’ your data stream(s) if required. Otherwise, move on to the next step. By default, all of the data streams are selected.
You have the option to select a specific data stream for which you will be exporting the data to BigQuery. Just click on ‘Edit’ if you want to edit your data streams:
Step-14: Click on the checkbox “Include advertising identifiers for mobile app streams” if you have a mobile app and you want to export mobile advertiser identifiers. Otherwise, move on to the next step.
Step-15: Select the frequency of your data import to BigQuery by selecting both ‘Daily’ and ‘Streaming’ settings and then click on the ‘Next’ button:
You should now see a screen like the one below:
Step-16: Click on the ‘Submit’ button. You should now see a screen like the one below:
Congratulations! Your GA4 account is now successfully linked to your Big Query project.
Step-17: Navigate to https://console.cloud.google.com/apis/dashboard
Step-18: Make sure your BigQuery project for GA4 is selected:
Step-19: Click on the ‘+ENABLE APIS AND SERVICES’ button:
You should now see a screen like the one below:
Step-20: Search for “Big Query” and then click on “Big Query API” button:
Step-21: Click on the ‘Manage’ button:
Step-22: Click on ‘Credentials’ link from the left-hand side navigation menu:
Step-23: You would now need to add a firebase service account.
This account would be used to export Google Analytics 4 data to BigQuery. To do that click on the ‘+create credentials’ button:
Step-24: Click on the ‘Service account’ link to create a new service account:
You should now see a screen like the one below:
Step-25: Enter firebase-measurement@system.gserviceaccount.com as service account name:
Step-26: Click on the ‘Create’ button:
You should now see a screen like the one below:
Step-27: Click on the ‘DONE’ button.
You should now see your new service account listed like the one below:
Step-28: Wait for a full 24 hours.
It usually takes around 24 hrs for your GA4 data to be available in your BigQuery project.
Step-29: Navigate back to your BigQuery account and make sure that your project used for collecting GA4 data is selected:
Step-30: Scroll down and then click on the project ID of the project which collects GA4 data:
You should now be able to see a data set named “analytics_<property_id>“:
For each Google Analytics 4 property that is 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.
In my case, the property ID is 207472454
That’s why the name of my data set is ‘analytics_207472454‘
This data set contains the following two data tables which contain your GA4 data:
- events_(<number of days>)
- events_intraday_<current date>
If you want to learn more about these two data tables then check out this article: events_ & events_intraday_ tables in BigQuery for GA4 (Google Analytics 4)
Conclusion
You can use a Google Analytics 4 property and BigQuery to evaluate the limitless possibility of new insights and define your own advance analytics capabilities.
Furthermore, you can also connect BigQuery with third-party tools using native connectors to integrate more data.
BigQuery also supports most of the visualization tools and you can make use of them to build dashboards and insights to enhance your business growth.
If you want to send GA3 data to Google Big Query and that too without using GA 360 then check out this article: Sending Google Analytics data to BigQuery without 360