How to stream data from Google Analytics 4 to BigQuery

Updated on 2022-06-01

Introduction to BigQuery

BigQuery is a fully managed, enterprise-scale data warehouse, designed to allow fast queries in SQL across massive data sets.

From Google Analytics 4 you can stream data into your own BigQuery warehouse and use this raw data set to power any Business Intelligence (BI) needs.


Any Google Analytics 4 account can export to BigQuery, but using Littledata’s GA4 tracking allows you to build even more powerful ecommerce reports

What are the advantages of BigQuery over Google Analytics?

Google Analytics can only store user-attributable data points (as opposed to aggregate metrics) for 14 months. So, if you intend to analyze marketing attribution or user journeys over more than a year, you need to export and save the data.

Think of BigQuery as a long-term data store that your brand owns — whereas you only use GA reports with Google’s consent. Since you cannot export historical event data from GA, we recommend setting up the BigQuery link now even if you have no immediate plans to use the data.

Once all the customer touch-points from GA have been stored in BigQuery — including which campaigns and content they engaged with, what products interest them, and what they purchased — analysts have maximum flexibility to use their preferred SQL queries and BI software to build reports.

Setting up BigQuery on Google Cloud

  1. Go to Google Cloud Platform

  2. If you don’t have a project already, create one

    If you have an existing project, you will need to enable the BigQuery API. Once you’ve done so, you should see BigQuery in the “Resources” section of Cloud Platform.

  3. Create a Service Account for Google Analytics. From the Navigation panel on the left, go to IAM & admin > Service accounts. Verify that has been added as a member of the project, and given the primitive role of editor. Add the account if necessary.

Refer to Google Cloud’s documentation about service accounts for more information.

Setting up the connection in Google Analytics

  1. Sign in to Google Analytics. Use an email address that has OWNER access to the BigQuery project, and also has Editor role for the Analytics property that includes the data stream you want to link.
  2. Go to Settings > Property Settings > BigQuery links
  3. Then select a BigQuery project linked with the same Google account or specify a project by ID
  4. Select data streams or exclude events from the stream by name
  5. Select daily and streaming exports
  6. Select the region to store the data in. Although Google Analytics will still process data in the USA we recommend storing the data in the country where your company is registered.
  7. Confirm the settings
  8. Check the next day that data is coming into BigQuery. It could take up to 24 hours for the data connection to set up.



Can any Littledata user send data to BigQuery?

Anyone using Littledata's Shopify to GA4 connection can send data to BigQuery via GA4. We offer support for BigQuery on Littledata Plus plans.


How much does BigQuery cost?


Can you export to data warehouses other than BigQuery?


Is this a real-time data feed?


Is there a limit to the data stored or processed in BigQuery?