0Pricing
Digital Marketing Academy · Lesson

Advanced Google Analytics 4 and BigQuery

Use GA4 exploration reports and BigQuery exports for deep behavioral analysis.

Advanced Google Analytics 4 and BigQuery is a free Digital Marketing Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Digital Marketing Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

GA4 Explorations for Advanced Analysis

GA4 Explorations is an advanced analysis workspace offering six exploration types: Free Form (drag-and-drop table and chart building), Funnel Exploration, Path Exploration, Segment Overlap, Cohort Exploration, and User Lifetime.

Unlike standard GA4 reports with fixed dimensions, Explorations lets analysts build custom queries across any combination of dimensions and metrics, with up to 10 dimensions and 10 metrics per query.

Cohort Analysis to Measure Retention in GA4

GA4's Cohort Exploration groups users by their acquisition date (or first event date) and tracks their behavior over subsequent weeks or months, revealing how well you retain users acquired through different channels and campaigns.

A cohort chart showing steep week-2 drop-off signals an onboarding problem; cohorts from content marketing that have higher 90-day retention than paid cohorts inform where to invest for sustainable growth.

Comparing Cohorts by Acquisition Channel

Segmenting cohort analysis by acquisition channel reveals whether users from organic search, paid social, email referrals, or direct traffic have meaningfully different retention and engagement patterns over time.

If organic search cohorts show 3x better 60-day retention than paid social cohorts, this data supports investing more in SEO and content — and potentially reducing paid social spend that acquires low-lifetime-value users.

GA4 BigQuery Export Setup

GA4 offers a native integration to export raw, unsampled event-level data to Google BigQuery daily (batch) or in streaming mode, creating a permanent data warehouse of every interaction your users have with your digital properties.

The export is free for the BigQuery connection but you pay for BigQuery storage and query costs. Setup is done in GA4 Admin under BigQuery Linking and requires a Google Cloud project.

Querying GA4 Data in BigQuery

GA4 exports data to BigQuery in a nested JSON structure organized by event — each row is one event, with user and session properties stored as key-value pairs in nested RECORD fields.

Analysts use standard SQL to query the data, but must use UNNEST() to flatten the nested event_params and user_properties arrays before filtering by specific parameter values — a syntax different from flat relational tables.

Example BigQuery Session Query

A common GA4 BigQuery query joins session-level data with conversion events: unnesting session_traffic_source data to get channel, then counting sessions, users, and conversions by channel for a specified date range.

This type of query produces unsampled, fully customizable channel performance data that the standard GA4 interface cannot provide, especially valuable for high-traffic properties where GA4 applies data sampling in reports.

Building Blended Data Models in BigQuery

BigQuery enables analysts to JOIN GA4 behavioral data with CRM data, ad spend data, and product data in a single query, creating blended models that are impossible within any single marketing platform.

For example, joining GA4 session data with Salesforce CRM export can link marketing channel acquisition to downstream closed revenue — connecting top-of-funnel activity to bottom-of-funnel business outcomes.

Connecting BigQuery to Looker Studio

Looker Studio (formerly Data Studio) connects directly to BigQuery as a data source, allowing analysts to build visual dashboards powered by custom SQL queries against the full GA4 event dataset.

This combination enables reports that update automatically as new BigQuery data arrives, with the flexibility of custom SQL under the hood and the accessibility of a drag-and-drop dashboard builder for non-technical stakeholders.

Scheduled Queries for Automated Reporting

BigQuery Scheduled Queries run SQL on a defined schedule — daily, weekly, or hourly — and write results to a destination table, enabling fully automated data pipeline updates without manual query execution.

A common use case is a daily scheduled query that aggregates yesterday's GA4 event data into a summary table, which Looker Studio then reads for dashboards that always show current data without analyst intervention.

Predictive Audiences in GA4

GA4 uses machine learning to create predictive audiences based on three scores: purchase probability (likelihood to purchase in the next 7 days), churn probability (likelihood to not return), and revenue prediction.

These audiences can be exported directly to Google Ads to target high-purchase-probability users with conversion campaigns, or to suppress high-churn-probability users from retention campaigns — acting on ML predictions rather than waiting for behavior to occur.

GA4 Custom Dimensions and Metrics

GA4 allows marketers to define custom dimensions (user-level or event-level attributes beyond the defaults — such as subscription tier, content category, or A/B test variant) and custom metrics (numerical values like reading time or videos watched) to capture business-specific signals.

Custom dimensions and metrics appear throughout GA4 reports and Explorations just like default dimensions, enabling analysis of performance by attributes that are unique to your product or content strategy and invisible to the default GA4 data model.

GA4 Advanced Features Check

Test your understanding of advanced GA4 and BigQuery capabilities.

GA4 and BigQuery Recap

GA4 Explorations unlock advanced analysis including funnel, cohort, and path exploration without sampling limits in the workspace. The BigQuery export brings raw, event-level data into a SQL environment for fully custom analysis.

Connecting BigQuery to Looker Studio creates automated dashboards from custom models, while GA4's predictive audiences allow machine learning predictions to directly power Google Ads targeting.

Frequently asked questions

Is the “Advanced Google Analytics 4 and BigQuery” lesson free?

Yes — the full text of “Advanced Google Analytics 4 and BigQuery” is free to read here on the web, and the Digital Marketing Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Digital Marketing Academy course, upgrade to CoddyKit PRO.

What will I learn in “Advanced Google Analytics 4 and BigQuery”?

Use GA4 exploration reports and BigQuery exports for deep behavioral analysis. You practise Digital Marketing Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Digital Marketing Academy?

No prior experience is required. Digital Marketing Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Advanced Google Analytics 4 and BigQuery” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Digital Marketing Academy lesson?

Yes. Every Digital Marketing Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Multi-Touch Attribution Models
  2. Advanced Google Analytics 4 and BigQuery
  3. Marketing Mix Modeling
  4. Building Executive Marketing Dashboards
← Back to Digital Marketing Academy