How to connect and export data from GA4 to BigQuery

Table of contents for how to connect and export data from GA4 to BigQuery  

  1. Why export GA4 data to BigQuery?
  2. Enabling BigQuery in Google Cloud
  3. Link BigQuery to a Google Analytics 4 property
  4. Delete link to BigQuery
  5. FAQ

In this article, I am going to talk about how to connect and export data from Google Analytics 4 to BigQuery.

Why export GA4 data to BigQuery?

Google Analytics 4 allows you to link to a BigQuery Project where you can run custom queries on large data sets. You can export all of the events from GA4 to BigQuery and then use SQL-like syntax to query the data. 

Below are few reasons why you should consider exporting data to BigQuery:

  • Store data in BigQuery and then after processing you can send it to other data warehouses like AWS or Azure.
  • Perform advanced analysis on the raw data from GA4 property.
  • Connect multiple data streams from GA4. For example, you can pull data into BigQuery from Android apps, IOS apps, and websites, all from one central point.
  • Join your data with other marketing or CRM tools.
  • Export to BigQuery is completely free for GA4 properties. This was earlier only available in GA360 (Premium Universal Analytics) accounts with a paid subscription.
  • Visualize your data in tools such as Tableau, Qlik Sense, PowerBI, and Data Studio.

Now let’s jump onto how to set up a BigQuery export. For this purpose, you will require the following things:

  1. GA4 property with admin rights
  2. Google Cloud project with admin rights
  3. Both admin accounts must use the same email address
 
Get the E-Book (50 Pages)

 
Get the FREE E-Book (50+ Pages)

Enabling BigQuery in Google Cloud

The first part is to create a project in Google Cloud and enable BigQuery for this. Follow the below steps to know more:

Step-1: Navigate to https://console.cloud.google.com/ and log in with your credentials.

Step-2: Click on the ‘Select a project’ drop-down.

Step-3: A new pop-up will appear like below. Now click on ‘New Project’.

Step-4:  Give your project a name and click on ‘Create’.

Note: If you are working for any organization, you also get the option to select the location. As of now, I am keeping it blank.

Step-5: Once created, your project will appear like below. Click on the project to select it.

Congratulations! You have successfully created your first BigQuery project.

Step-6: Now click on the three horizontal lines beside ‘Google Cloud Platform’.

Step-7: Now hover your cursor over ‘API and Services’ and then click on ‘Library’.

Step-8: Type ‘BigQuery’ in the available search box.

Step-9: Select ‘BigQuery API’.

Step-10: Now click on ‘Enable’.

Once clicked, you will get a screen like below 

Congratulations! You have successfully enabled the BigQuery API. Now, let’s move to the next part for linking GA4 with BigQuery.

Link BigQuery to Google Analytics 4 property

Follow the below steps to start linking your GA4 property to BigQuery.

Step-1: Navigate to your Google Analytics 4 account and click on ‘Admin’.

Step-2: Now under the ‘Property’ column, click on ‘BigQuery Linking’.

Step-3: A new configuration panel will open like below. Now click on ‘Link’.

Step-4: A new panel will open again, like below. Now click on ‘Choose a BigQuery Project’.

Step-5: Mark the check box in front of the project for which you want to link.

Step-6: Click on ‘Confirm’.

Step-7: In this step we are going to select the preferred data location where you would like your analytics to be stored. 

These are the Google Data servers and it’s recommended to choose the one which belongs to your region. If you choose the wrong region and want to change it after the linking is done, you will have to do the complete linking process again from the start. 

You can select the region by clicking on the drop-down menu available under ‘Data Location’.

Step-8: Once the desired location is selected, click on ‘Next’.

Step-9: In this step we have to select the data streams. 

If your Google Analytics 4 property has multiple streams like ‘Android App’, ‘IOS App’, and ‘website’, you can select all of them. 

By default, if you have more than one stream then all will be selected and if you want to change it you can just simply click on edit and select the one for which you are setting this BigQuery export.

Step-10: If you have a mobile app as one of your data streams, mark the checkbox ‘Include advertising identifiers for mobile app streams’ for advertising purposes.

Export data from GA4 to BigQuery

Step-11: Now in this step we have to configure the frequency of data export to BigQuery. There are two options available:

  1. Daily: One-day complete data will be exported to BigQuery at an interval of 24 hours.
  2. Streaming: The streaming option continuously exports data to BigQuery. The export happens continuously throughout the day. You can see data in BigQuery just within a few minutes. The streaming option is not available if you are using the free version of BigQuery. However, if you enable your Google Cloud billing, you can use the streaming export functionality.

Mark the checkbox as per your business need and click on ‘Next’.

Step-12: Now review your set up and if everything is perfect, click on ‘Submit’.

Step-13: Upon successful linking, you will get the below screen.

Congratulations! You have successfully connected your GA4 property to export data in BigQuery.

Now wait for 24hrs and then navigate to your BigQuery Project and you will see raw data from Google Analytics 4 like below.

Delete link to BigQuery

If you want to delete your BigQuery link you can follow the below steps.

Step-1: Navigate to your Google Analytics 4 account and click on ‘Admin’.

Step-2: Now under the ‘Property’ column, click on ‘BigQuery Linking’.

Step-3: Select the project.

Step-4: In the top right corner, click on the three vertical dots and then click on ‘Delete’.

Other articles on Google Analytics BigQuery

  1. Advantages of using Google BigQuery for Google Analytics
  2. Cost of using BigQuery for Google Analytics
  3. Guide to BigQuery Cost optimization
  4. What is Google BigQuery Sandbox and how to use it
  5. Understanding the BigQuery User Interface
  6. Sending data from Google Analytics to BigQuery without 360
  7.  How to connect GA4 (Google Analytics 4) with BigQuery
  8. events_& events_intraday_ tables in BigQuery for GA4 (Google Analytics 4)
  9. Using Google Cloud pricing calculator for BigQuery
  10. How to access BigQuery Public Data Sets
  11. How to use Google Analytics sample dataset for BigQuery
  12. Connect and transfer data from Google Sheets to BigQuery
  13. How to query Google Analytics data in BigQuery
  14. How to send data from Google Ads to BigQuery
  15. What is BigQuery Data Transfer Service & how it works.
  16. How to send data from Facebook ads to BigQuery
  17. How to send data from Google Search Console to BigQuery
  18. How to pull custom data from Google Analytics to BigQuery
  19. Best Supermetrics Alternative – Dataddo
  20. Google Analytics BigQuery Tutorial
  21. How to backfill Google Analytics data in BigQuery

Frequently asked questions about how to connect and export data from GA4 to BigQuery

How do I link Google Analytics 4 to BigQuery?

Follow the below steps to link Google Analytics 4 to BigQuery
1. Click on ‘Admin’ in the GA4 account and under the ‘Property’ column, click on ‘BigQuery Linking’.
2. Now click on ‘Link’ to create a new connection.
3. Click on ‘Choose a BigQuery Project’.
4. Select your BigQuery Project (You can create a new project if needed).
5. Select your data location.
6. Select the data streams for which you want to export the data.
7. Select the frequency.
8. Review your configuration and click on ‘Submit’.

What is the cost involved in GA4 and BigQuery export?

GA4 and BigQuery exports are completely free of cost. You can export your GA4 data to a free instance of BigQuery (BigQuery Sandbox). However, if your export exceeds the limit of BigQuery Sandbox, it will incur charges.

What are the advantages of GA4 and BigQuery export?

Following are the advantages of GA4 and BigQuery export.
– Store data in BigQuery and then after processing you can send it to other data warehouses like AWS or Azure.
– Perform advanced analysis on the raw data from GA4 property.
– Connect multiple data streams from GA4. For example, you can pull data into BigQuery from Android apps, IOS apps, and websites, all from one central point.
– Join your data with other marketing or CRM tools.
– Export to BigQuery is completely free for GA4 properties. This was earlier only available in GA360 (Premium Universal Analytics) accounts with a paid subscription.
– Visualize your data in tools such as Tableau, Qlik Sense, PowerBI, and Data Studio.

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade
error: Alert: Content is protected !!