How to Link Google Analytics 4 (GA4) with BigQuery: A Step-by-Step Guide

Big Data Analytics

Google Analytics

Blog

If you are looking to perform deeper analysis of your GA4 data, connecting Google Analytics 4 to BigQuery is essential. With this integration, you gain direct access to raw, event-level data that enable you to build advanced dashboards, run custom SQL queries and store historical logs beyond GA4’s built-in limits.

In this guide, we’ll walk you through the exact steps to link GA4 to BigQuery, covering the prerequisites, permissions, common pitfalls and how to verify your export.

Prerequisites Before You Begin

Before linking GA4 to BigQuery, make sure the following are ready:

  • A Google Cloud Platform (GCP) project with billing enabled
  • Editor or Owner access to the GCP project
  • Admin access to the GA4 property
  • BigQuery API enabled in the GCP project

Step 1: Confirm or Create a GCP Project

1. Go to Google Cloud Console

2. In the top-left project selector:

  • Select an existing project, or
  • Click New Project, assign a name, and create it.

3. Ensure billing is active:

  • Navigate to Console → Billing, and link your project to a billing account.

 Step 2: Enable BigQuery and Create a Dataset

1. In the Cloud Console, go to Navigation menu → BigQuery.

2. Under Explorer, make sure the correct project is selected.

3. Click the three-dot menu next to the project name → Create dataset.

Configuration Settings:

  • Dataset ID: Use a descriptive name, e.g., analytics_<propertyid>
  • Data Location: Choose your preferred region (e.g., EU, asia-south1).
  • Default Table Expiration: Optional, useful for cost control
  • Encryption: Leave as Google-managed unless using Customer-Managed Encryption Keys (CMEK)

Step 3: Set Up the Required Permissions

Make sure the correct access is assigned:

  • Your Google account must have the Editor or Owner role on the GCP project
  • You need Editor or Admin access to the GA4 property
  • If the dataset isn’t visible during linking, request Editor access via IAM → Add Principal → Role = Editor

Step 4: Link GA4 to BigQuery (Step-by-Step)

In GA4 (analytics.google.com)

1. Go to analytics.google.com and open your GA4 property

2. Bottom-left → Click Admin (gear icon)

3. Under the Property column → Select BigQuery Linking

4. Click + Link or Link

In the linking interface:

1. Google Cloud project: Choose the project you created earlier

  • If the project doesn't appear, confirm you're logged into the correct account and have Editor access

2. Dataset:

  • Choose "Select existing dataset" (recommended), or
  • Let GA4 create one (named analytics_<propertyid> by default)

3. Export frequency:

  • Enable Daily export (required)
  • Optionally enable Streaming export for near-real-time data

4. Advanced options: Choose whether to include advertising identifiers (for app streams)

5. Review and click Submit

Key Reminders Before You Proceed

1. Missing Dataset Selection Step?

If you don’t see the dataset selection step during the linking process, check the IAM permissions on your GCP project. Your account must have the Editor role. In some cases (e.g., Firebase-backed properties), the linking flow may differ slightly.

2. GA4 Link is Forward-Looking Only

The GA4–BigQuery integration only exports data from the moment the link is activated. It does not support historical raw-event backfill.

Step 5: Verify the Export is Working

  • For streaming export: Wait a few minutes
  • For daily export: Wait a few hours
  • After this window, check BigQuery → Job History or GA4 Admin → BigQuery Linking for confirmation

Common Errors and How to Fix Them

1. Dataset Not Found / Wrong Region

Error Example: Dataset ... was not found in location US

How to fix:

  • Make sure you are querying the correct region. You can check the dataset location in BigQuery → Dataset → Details tab

2. Can't See Dataset During Linking

How to fix:

  • Confirm you are using the same Google account with Editor role
  • Use IAM in Cloud Console to assign yourself Editor access

3. No Historical Data Appearing

Explanation: GA4 → BigQuery is forward-looking only

How to fix:

  • Use the Data API for aggregated historical backfill
  • Or export historical aggregates manually via CSV
  • Raw event-level backfill is only available in GA360

4. No Tables After Linking

How to fix:

  • Go to GA4 Admin → BigQuery Linking to check for errors
  • Confirm that billing is enabled in GCP
  • Check BigQuery Job History to troubleshoot failed writes

Connecting GA4 to BigQuery gets the full power of your analytics data. With direct access to raw events, you can build advanced dashboards, run cohort analysis and store valuable historical data. While the setup requires precise permissions and configuration, following the steps above ensures a smooth integration.

Featured Insights