This tutorial shows you how to build a unified SEO data pipeline that combines GA4, Google Search Console, and Ahrefs data in BigQuery for advanced analysis and reporting.
Architecture Overview
GA4 → BigQuery Export → BigQuery
GSC → API + Python → BigQuery
Ahrefs → API + Python → BigQuery
BigQuery → SQL Views → Looker Studio / Python Analysis
Step 1: Enable GA4 BigQuery Export
In GA4 Admin
- Go to Admin → Data Streams → Select your web stream
- Click "Configure BigQuery linking"
- Select your BigQuery project
- Choose "Daily" export frequency
- Select the dataset location
Verify Data Flow
SELECT
COUNT(*) as event_count,
MIN(event_date) as earliest_date,
MAX(event_date) as latest_date
FROM `project.analytics_12345.events_*`
WHERE _TABLE_SUFFIX >=