Unifying GA4 & Search Console Data in BigQuery

How to bring GA4, Search Console and other data from many sites into BigQuery for automated reporting.

  • Turn on the native BigQuery exports for GA4 and Search Console on every site now. Neither backfills, so data only starts from the day you enable it.
  • Skip connectors and spreadsheets: the exports are free to set up and give you raw data you own.
  • Send all sites' exports to one Google Cloud project in the same region, since queries can't join across regions. Give each Search Console property a unique dataset name (e.g. searchconsole_example_com).
  • Add a small sites table mapping each site to its GA4 and Search Console datasets plus reporting labels (client, brand, region), and keep a separate reporting dataset so nothing reports from raw exports.
  • Build one daily table with one row per site per day (sessions, leads, clicks, impressions). Generate per-site query blocks via a BigQuery script, Dataform/dbt, or a script that writes a UNION ALL scheduled query.
  • Run the job daily into a date-partitioned table and reprocess the last few days, since GA4 daily tables can update for up to 72 hours and Search Console data lags about two days.
  • Roll the daily table into a monthly table (this month, last month, same month last year) and power one Looker Studio report with a site filter. It stays fast because it never reads raw events.
  • Automate delivery with scheduled Looker Studio PDFs or a per-client script, and add an alert query that flags any site with no rows for yesterday to catch broken tracking early.
  • Other sources (Google Ads, CRM, even Matomo) follow the same pattern: land raw data, then map it into the shared daily shape so reports don't depend on the analytics tool used.
  • Costs stay very low because storage is small and the daily job reads only a few days of data. Costs come from reports that query raw exports directly, which this setup avoids.

Reporting across many sites breaks down when GA4, Search Console and other sources live in separate tools.

If you want one report across many sites, turn on the native BigQuery exports for each one and build a single reporting layer on top. Skip the connectors and spreadsheets. The exports are free to set up and give you raw data you own.

What to Use for Each Source

Source How It Gets to BigQuery Where It Lands
GA4 The BigQuery link in GA4 Admin One dataset per property: analytics_123456
Search Console Bulk data export in Search Console settings One dataset per property, searchconsole by default
Google Ads BigQuery Data Transfer Service One dataset per account
CRM & others A scheduled sync or API script Your own raw tables

Neither export backfills. GA4 and Search Console both start from the day you enable them, so turn them on for every site now, even if the reporting comes later.

One Project, Many Datasets

  • Send every site’s exports to the same Google Cloud project, in the same region. Queries can’t join across regions.
  • Give each Search Console property its own dataset name, like searchconsole_example_com, since the default name can only be used once.
  • Keep a reporting dataset for the tables you build. Nothing should report from the raw exports directly.
  • Add a small sites table that maps each site to its GA4 dataset, Search Console dataset and any labels you report by (client, brand, region).

The Reporting Layer

The goal is one table with one row per site per day. Each site contributes a block like this:

WITH ga AS (
  SELECT
    'example.com' AS site,
    PARSE_DATE('%Y%m%d', event_date) AS date,
    COUNT(DISTINCT CONCAT(user_pseudo_id, '.', CAST(
      (SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING))) AS sessions,
    COUNTIF(event_name = 'generate_lead') AS leads
  FROM `project.analytics_123456.events_*`
  WHERE _TABLE_SUFFIX >= FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY))
  GROUP BY date
),
gsc AS (
  SELECT
    'example.com' AS site,
    data_date AS date,
    SUM(clicks) AS clicks,
    SUM(impressions) AS impressions
  FROM `project.searchconsole_example_com.searchdata_site_impression`
  WHERE data_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
  GROUP BY date
)
SELECT site, date, sessions, leads, clicks, impressions
FROM ga
FULL JOIN gsc USING (site, date)

A wildcard can’t span datasets, so with many sites you generate the blocks from the sites table. Three ways I’ve done it:

  1. A BigQuery script that loops over sites and runs the query for each with EXECUTE IMMEDIATE.
  2. Dataform or dbt, with one model per source that loops over a list of sites.
  3. A small script that writes the UNION ALL and saves it as a scheduled query.

Run it daily, write to a table partitioned by date, and reprocess the last few days each run. GA4 daily tables can update for up to 72 hours, and Search Console data arrives about two days behind.

Automated Monthly Reports

  • Build a monthly table from the daily one with a scheduled query: this month, last month and the same month last year for each site.
  • One Looker Studio report with a site filter, connected to the reporting tables. It stays fast because it never reads raw events. See optimizing slow Looker Studio reports.
  • Schedule delivery. Looker Studio can email a PDF on a schedule. For one report per client, a script that queries the monthly table and sends each site’s numbers works better.
  • Add alerts. A scheduled query that flags a site whose export has no rows for yesterday catches broken tracking early.

Other Sources

Anything else follows the same pattern: land it raw, then map it into the daily shape. I inherited a pipeline that moved Matomo data into BigQuery for a group of sites, and the fix was the same. Matomo visits became sessions in the shared daily table, and the reports didn’t need to know which analytics tool a site used.

For CRM data, see daily HubSpot to BigQuery syncs.

What It Costs

For most sites, very little. Storage is small, and the daily job reads only a few days of data. The cost comes from reports that query raw exports directly, which this setup avoids. I cover limits and caps in BigQuery cost control.

Related: syncing Google Search Console in BigQuery and Google Analytics queries for BigQuery.

Resume