How to set up BigQuery linkage in your Google Analytics 4 property

Google Analytics 4 (GA4) allows you to export raw event-level data to BigQuery for in-depth analysis. Below are the steps to set up the export, along with examples.


Step 1: Create a Google Cloud Project

  1. Go to the Google Cloud Console.
  2. Click Select a project > New Project.
  3. Enter a Project Name (e.g., “GA4-BigQuery-Project”).
  4. Choose an organization and location, then click Create.
  5. Once created, go to the project dashboard.

Example: If your company is “ABC Retail,” name the project “ABC-Retail-GA4.”


Step 2: Enable BigQuery API

  1. Navigate to APIs & Services > Library.
  2. Search for BigQuery API and click Enable.

Step 3: Set Up BigQuery Billing

  1. Go to Billing in Google Cloud Console.
  2. Link a billing account if not already linked.
  3. Ensure you’re on the free tier if just testing.

Step 4: Link GA4 to BigQuery

  1. Open Google Analytics Admin.
  2. In Admin, go to the Property Settings of your GA4 account.
  3. Under Product Links, click BigQuery Links.
  4. Click Link and follow these steps:
    • Select the Google Cloud project created earlier.
    • Choose a Region for your BigQuery dataset (e.g., US or EU).
    • Select Daily Export (recommended) or Streaming Export.
    • Click Submit.

Example: If your GA4 property tracks e-commerce events, you may want to enable both daily and streaming exports to analyze real-time transactions.


Step 5: Verify Data in BigQuery

  1. Go to the BigQuery Console.
  2. Expand your project and look for the dataset (e.g., analytics_XXXXXXXX).
  3. Click on a table (e.g., events_YYYYMMDD) and run a simple query:
SELECT event_name, COUNT(*) AS event_count
FROM `your_project.analytics_XXXXXXXX.events_YYYYMMDD`
GROUP BY event_name
ORDER BY event_count DESC;
  1. Click Run to see the results.

Step 6: Automate and Optimize Data Usage

  • Set up scheduled queries to extract insights regularly.
  • Use BigQuery ML for predictive analytics.
  • Integrate with Looker Studio for visualization.

Things to Keep in Mind

  • Data Retention: GA4 retains data for 14 months by default; adjust settings accordingly.
  • Cost Considerations: BigQuery charges based on query processing and storage; monitor usage to avoid unexpected costs.
  • Streaming vs. Daily Export: Streaming is useful for real-time analytics but incurs higher costs.
  • Permissions: Ensure proper IAM roles are assigned for security and data access control.
  • Data Transformation: GA4’s event-based model differs from Universal Analytics; plan queries accordingly.

Discover more from GA4BigQuery

Subscribe to get the latest posts sent to your email.

Posted in

2 responses to “How to set up BigQuery linkage in your Google Analytics 4 property”

  1. Mastering GA4 Users: Metrics, Identity, and BigQuery Analysis – GA4BigQuery Avatar

    […] Note: if you haven’t started tour bigquery journey, start here: How to set up BigQuery linkage in your Google Analytics 4 property […]

    Like

  2. Why Everyone is Turning to BigQuery for GA4 Data in 2025; Why Sampling Is a Growing Concern – GA4BigQuery Avatar

    […] Check out my step-by-step GA4 to BigQuery linkage guidance here: How to set up BigQuery linkage in your Google Analytics 4 property […]

    Like

Leave a comment

Discover more from GA4BigQuery

Subscribe now to keep reading and get access to the full archive.

Continue reading