Home

Connect GA4 to BigQuery – Your Step-by-Step Guide

BigQuery has long been a preferred destination for data export from Google Analytics 4, and for good reason. It allows you to query and manipulate hundreds of thousands or even millions of GA4 records. This way, you can drill down into vital events, filter out irrelevant or faulty fields, and make your analysis more accurate. To help you get started, check out this guide explaining the options available for a GA4 export to BigQuery.

What methods can you use to connect Google Analytics 4 to BigQuery?

So, your goal is to export your Google Analytics data to BigQuery. There are different methods to do this:

  • GA4 to BigQuery connector by Coupler.io – You can select a user-friendly solution that will allow you to easily connect GA4 to BigQuery in just a few minutes and export your data automatically on a schedule. The advantage of this method is its simplicity and the ability to use the same tool to load marketing data from other apps to BigQuery for cross-channel analysis. 
  • BigQuery Export (BigQuery links) – This is a native option to connect GA4 to BigQuery. To set up the connection, you need to configure both apps accordingly and adjust the settings. This method allows you to stream data from Google Analytics at a chosen frequency. Then you can query it in BigQuery for reporting and analytics. 
  • Google API – To connect GA4 to BigQuery programmatically, you can create a custom API integration. This involves writing a script that pulls the real-time data you need from the Google Analytics API. By doing so, you’ll export data tailored to your specific reporting needs. However, it requires programming skills or the assistance of a data analyst.
  • Manual export – This implies using native functionality and exporting GA4 data as a CSV file and then importing it to BigQuery. This simple method will be a good fit for a one-time GA4 export to BigQuery. However, it’s inefficient for repeated data transfers – in this case, it’s better to opt for an automated connection.

How to connect Google Analytics 4 to BigQuery with Coupler.io

Coupler.io is a data automation and analytics platform to turn raw data into insightful reports. This user-friendly solution allows you to automate data transfer from business apps to BigQuery, Excel, Google Sheets, Looker Studio, or Power BI. 

Let’s see how to export data from GA4 to BigQuery with Coupler.io and automate it on a schedule.

Click Proceed in the form below. We’ve preselected the data source and destination – in our case, GA4 and BigQuery.

Step 1. Collect data from Google Analytics

  • Connect your Google Analytics account. Select one of the analytics accounts available in your GA4 source account. Then, specify the properties for exporting data.
  • Specify the report period and select up to 9 dimensions and up to 10 metrics that should be included into your report. 
1. Basic settings
  • Specify the reporting period and select up to 9 dimensions and up to 10 metrics to include in your report. 
2. Additional source settings

If you want to export more metrics, dimensions, or data from more GA4 accounts, click + Add source and adjust the source settings again. Later, you can merge all datasets into a single one to import into the same destination file.

3. Add source

When you’re done with the source settings, proceed to the next step.

Step 2. Transform data

In this step, you can preview your data and make the following transformations:

  • Rename, rearrange, hide, or add columns.
  • Sort data in ascending or descending order.
  • Filter data to extract it based on specific criteria.
  • Create new columns with custom formulas.
  • Aggregate data using operations like sum, avg., count, min., or max.
  • If you’ve previously connected several sources, blend data in the chosen manner:
    • Append – merge datasets with similar structures and columns matched by name.
    • Join – combine datasets with different structures and at least one matched column.
4. Data transformation step

Once you’re ready with your data, move forward to set up your destination.

Step 3. Load data and schedule refresh

Now, you’re ready to connect your BigQuery account. To do this, you’ll first need to generate a Google Cloud JSON key. See these instructions on how to get it. Once done, upload it in the connection form. The Project ID and Connection name will be filled in automatically. Press Save.

Once the BigQuery account is connected, specify the dataset and table where Coupler.io should export your data. You can create a new dataset and table by typing new names.

Toggle on Autodetect table schema – this will help to structure your data correctly while importing.

6. Destination settings

You can optionally change the import mode. For the first import, the result won’t change, but it will matter when you set a schedule for the updates. If you select Replace, the old GA4 dataset will be replaced with its updated version during each data refresh. If you opt for Append, the updated version will be below the previous one. The latter can be helpful if you need to track changes chronologically.

Proceed to toggle on Automatic data refresh and configure the desired schedule to automate data load from Google Analytics 4 to BigQuery. Coupler.io can refresh data as frequently as every 15 minutes!

3. google search console export data schedule importer

After that, run the importer to export data from GA4 to BigQuery. Coupler.io will automatically keep it up to date, refreshing it on your schedule. Here’s an example of data exported from GA4 to BigQuery:

8. Data imported into BigQuery

Using Coupler.io, you can set up an automated connection quickly and easily. We’ve demonstrated how to connect Google Analytics 4 to BigQuery. However, this platform also allows you to create Google Analytics reports for clients by combining data from other sources.

Google Analytics 4 is one of the 60+ data sources available in Coupler.io, along with Google Ads, Facebook Ads, LinkedIn Ads, Mailchimp, Pipedrive, Shopify, and many more. You can also load data from Google Search Console to BigQuery for closed-loop analytics.

BigQuery export for Google Analytics 

BigQuery links are a native data export method that works well for backups. You can use them to export Google Analytics data to BigQuery daily or in near real-time. However, this option isn’t ideal for reporting, as you would pull all the data from your GA property. To create a report with specific data, you’ll need to query it using SQL, which requires specialized skills.

Before you get started, make sure that:

  • You sign in to the GA account with an email address that has Owner access to your BigQuery project.
  • The GA account has Editor or above access to the property from which you’ll export data.
  • Once you’re in an account that meets the mentioned criteria, click the Admin button with the gear icon in the bottom-left corner.
9. Admin
  • Scroll down to the Product links section and select BigQuery links.
10. BigQuery links
  • Click the Link button on the right side.
11. Link
  • Next, press Choose a BigQuery project, put a tick against the project to which you’ll import data, and click Confirm.
13. Confirm
  • Specify the Data location and press Next.
14. Specify the data location
  • Click Configure data streams and events to choose which data streams to include with the export and specific events to exclude.
15.1 Configure data streams and events
  • You can exclude events by clicking Add to select from a list of existing events. Another approach is to click Specify event by name to choose existing events by name or specify event names that have yet to be collected on the property.
15.2 Data streams to export

Once you’re ready, click Apply in the top right corner and proceed to choose the Export type for event data. You can select either or both of the options:

  • Daily: Exports all the data once per day from the previous day. The export typically occurs in the mid-afternoon of your property’s timezone but may be delayed until later or the following day. The following table is created each day: events_YYYYMMDD. This export type is recommended for querying data that require extended processing times, such as user attribution data. 
  • Streaming: Delivers near real-time data (within minutes). New user and new session traffic source data is excluded from export. For each day, one new table is created: events_intraday_YYYYMMDD. This table is deleted when events_YYYYMMDD is complete to avoid unnecessarily duplicating the data. Streaming isn’t recommended if you, for example, need to query for events recorded on a particular date.
15.3 Export type

For Analytics 360 properties, there’s an additional Fresh daily option. It’s faster than Daily, with data typically arriving by 5 a.m. and batched updates throughout the day, usually within 60 minutes. 

After selecting the export type, click Next to review the details and then press Submit. Your link will now be created.

15.4 Link created

This is the result of our data export:

15.5 Export result

Can I load data from Google Analytics to BigQuery using API?

Another method to export real-time Google Analytics data to BigQuery is by building a custom API integration. This requires coding skills in languages like Python or JavaScript to write a script that pulls data from the Google API into BigQuery. However, this method involves the export of all your GA records. To tailor the process for specific reporting needs, you’ll need to transform the data within the script – which makes it unnecessarily complex. 

Instead, you can just export data using the BigQuery links as described above and then query that data. For an even simpler solution, extract your data with Coupler.io, create a custom report on the go, import it into BigQuery, and have it auto-refreshed as often as every 15 minutes.

How to export GA4 to BigQuery manually

It’s not a typical situation, but it may happen that you’ll want to export only the specific data to BigQuery and do so on an individual basis. For example, you’ve just finished a campaign driving traffic to a particular landing page and want to back up the related analytics in a data warehouse.

You won’t need to connect GA4 to BigQuery to do that. Instead, you can export a report into a .csv file and import it into BigQuery.

To export a report from Google Analytics, load it and click the Share button at the top-right corner. Choose Download File and pick Download CSV.

16. Share report

Once you’ve downloaded the file, import it into BigQuery using one of the available methods.

Which of these methods allows you to load GA4 historical data to BigQuery?

You can load GA4 historical data to BigQuery using both Coupler.io and Google Analytics API. However, with Coupler.io, you won’t be able to get deep into the user level that you could do with native GA4-BigQuery import.

You can backfill historical data with the GA4 API, but this method would require involving new work to extract the data and load it into BigQuery. 

There are talks about a backfill feature. However, the release date is still unknown.

Which Google Analytics properties data can you export to BigQuery?

A property in Google Analytics is a website, blog, or application associated with a unique tracking ID. In your GA account, you can have multiple properties. 

You can generally export analytics information about all of these properties using the methods we’ve described above.

In Coupler.io, you’ll only need to select a Google Analytics property to export data from.

17. GA4 properties

For other methods, you can specify the property on your GA account that you need.

How to turn GA4 data into insights with ready-to-use dashboard templates

Exporting data from Google Analytics 4 to BigQuery opens up many opportunities. You can drill down into the raw data behind your website or app and extract the necessary insights. Such data can then be loaded into other databases like AWS or Azure and showcased as dashboards on BI platforms.

However, if you prefer ready-made reports with predefined criteria, consider using white-label templates to get your data directly from GA4 into BI tools. Coupler.io offers free GA4 dashboard templates for Google Sheets, Looker Studio, Power BI, and Tableau. Each template is equipped with a Coupler.io connector, so you can load your data into the dashboard automatically. Let’s review some of these dashboard templates below.

Web analytics dashboard

The web analytics dashboard template provides an overview of daily updates on key product and marketing metrics. You can open it every morning to see the growth of daily traffic and conversions.

web analytics dashboard looker studio

Using this dashboard, you can analyze your marketing performance in the following ways:

  • Check out acquisition: Discover where your audience comes from, including marketing channels, countries, devices, and more.
19. Acquisition
  • Gain insights into behavioral analytics: Dive into your users’ behavior and engagement. Track metrics like average engagement time, views, or number of engaged sessions per user.
20. Audience and behavior
  • Analyze conversions: Learn how your users convert, including metrics like total users, conversion rates, total revenue, etc., and track conversions over time.
21. Conversions

The dashboard is available for Looker Studio, Google Sheets, Power BI, and Tableau. To use it, click the readme/setup guide for step-by-step instructions.

GA4 dashboard for multiple properties

This Looker Studio dashboard aggregates GA4 data from multiple websites onto a single page. It shows traffic and engagement for all your websites in one place, so you don’t need to switch between browser tabs.

google analytics multiple properties dashboard

Here’s what insights you can gain from this dashboard:

  • Look at your total performance with filters: Access key performance metrics and apply filters by properties (websites), channels, and other criteria.
23. Look at your total performance with filters
  • View monthly performance dynamics: Track the monthly traffic trends for all your websites.
24. View monthly performance dynamics
  • Analyze performance by countries: Learn where most of your traffic comes from for informed decision-making on localization efforts.
25. Analyze performance by countries

To get started, navigate to the readme tab and follow the setup instructions.

Referral traffic performance dashboard

This one-page dashboard shows the performance of referral traffic to your website through multiple metrics such as new users, average session duration, bounce rate, and purchase revenue.

16.referral traffic performance dashboard template

What you can do with this dashboard:

  • Evaluate source effectiveness for user acquisition: Identify the referral sources that attract the most first-time visitors. Use these insights to optimize marketing strategies and focus efforts on the best-performing sources.
  • Analyze user engagement: Compare average session duration and bounce rates across referral sources. Detect sources that require attention to reduce bounce rates or enhance session quality.
  • Track conversions and revenue impact: Analyze purchase revenue to discover which referrals contribute the most to sales. Based on this data, strategically allocate marketing budgets to high-converting referral sources.
  • Monitor user behavior with key events: Figure out how users interact with your website based on the performance of individual sources.

Set up the dashboard by following the instructions in the template’s readme tab.

GA4 key event insights dashboard

The GA4 key event insights dashboard provides a structured view of users’ key actions on your website. It tracks event completions like purchases, form submissions, video plays, and button clicks to understand engagement and conversion trends.

ga4 key events insights dashboard

With this dashboard, you can:

  • Track engagement by device, browser, and screen resolution: Understand which devices, browsers, and resolutions your users commonly use. Use this information to improve their experience.
ga4 key events by device browser screen resolution
  • Analyze key events by traffic channels: Find out which channels drive the most interactions—organic search or paid campaigns. Key metrics include total users, unique event users, and average engagement time.
ga4 key events by channel
  • Explore regional performance: Use the geo view chart to pinpoint countries with the highest key event completion rates. Adjust your strategies to focus on these regions effectively.
ga4 key events report geo view

The dashboard template is built in Looker Studio. Follow the instructions in the Readme tab, connect your GA4 account, and you’ll have an automated dashboard with your own data.

After you’ve exported Google Analytics data to BigQuery, what can you do with your data?

Exporting data from Google Analytics 4 to BigQuery opens up many opportunities for you. You can drill down into the raw data behind your website or app and extract precisely the insights you need. Such data can then be loaded into other databases, such as AWS or Azure, and showcased on dashboards in Looker Studio, Tableau, or elsewhere.

Learn more about setting up GA4 connection with other destinations in our blog posts:

In this blog post, we covered different methods for exporting data from GA4 to BigQuery. This includes manual data export, connection via BigQuery links, and automated integration with Coupler.io. 

To sum up, if you prefer a simpler flow with an intuitive interface and/or want to load data from other marketing apps to BigQuery as well, then Coupler.io is an efficient solution in such a case. The tool can automatically transfer data from multiple sources to your database and keep it up to date without any manual effort.

If you wish to visualize your data, take a look at our guide explaining how to connect GA4 with Looker Studio. Try it out and see how it works for you. Thanks for reading.

Connect GA4 to BigQuery with Coupler.io

Get started for free