How do I connect GA4 to BigQuery?

Applies to: Google Analytics 4 (GA4) and Google BigQuery
Last updated: May 2025


Problem

You want to export your GA4 data to BigQuery so you can perform advanced analysis, join it with other datasets, or store raw event-level data for long-term access and reporting.


Solution

Unlike Universal Analytics (which only offered BigQuery access through GA 360), GA4 allows all users to export data to BigQuery for free. You’ll need to create a BigQuery project, set up a dataset, and link it to your GA4 property.


Step-by-Step Guide

1. Create a Google Cloud Project (if you haven’t already)

  1. Visit https://console.cloud.google.com
  2. Click the project dropdown at the top and select New Project
  3. Name the project and click Create
  4. After it’s created, go to the Billing section and link a billing account
    (BigQuery is free for small volumes, but billing must still be enabled)

2. Enable the BigQuery API

  1. In the Cloud Console, go to APIs & Services > Library
  2. Search for and enable BigQuery API

3. Link GA4 to BigQuery

  1. Go to https://analytics.google.com
  2. Select your GA4 property
  3. Click Admin > BigQuery Links
  4. Click Link (top right), then:
    • Select the Google Cloud project
    • Choose or create a BigQuery dataset (e.g., analytics_export)
    • Select Daily or Streaming data export (or both)
  5. Click Next, review the settings, then click Submit

4. Confirm the Export is Working

  • Within 24 hours, BigQuery will begin populating your dataset with GA4 tables
  • Data is exported into tables such as:
    • events_YYYYMMDD
    • events_intraday_YYYYMMDD (if streaming is enabled)

Optional: Query GA4 Data in BigQuery

Use SQL to run powerful queries like:

SELECT
event_name,
COUNT(*) AS event_count
FROM
`your-project.analytics_export.events_*`
WHERE
_TABLE_SUFFIX BETWEEN '20250501' AND '20250519'
GROUP BY
event_name
ORDER BY
event_count DESC;

You can also join GA4 data with:

  • CRM records
  • eCommerce transactions
  • Ad campaign metadata
  • External marketing tools

Notes

  • Data retention in BigQuery is under your control (unlike GA4’s default 14-month max)
  • Streaming exports can give near real-time data (limit: ~1M events/day)
  • GA4’s event-based structure makes BigQuery the most flexible tool for custom reporting

You may also like...