Unlock the power of Google Analytics with Big Query

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

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


Things to Keep in Mind

Comments

2 responses

Discover more from GA4 BigQuery

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

Continue reading