Member-only story

Essential BigQuery SQL Tips for GA4 Analysis

New to working with Google Analytics 4 (GA4) data in BigQuery? This guide is here to help! Learn how to use SQL to explore GA4 data, handle nested fields, and pull out meaningful insights — all with beginner-friendly steps to get you started quickly.

Maïssa
6 min readNov 10, 2024
The GA4 data schema on the interface of BigQuery

Understanding GA4’s Data Structure in BigQuery

GA4 data exported to BigQuery is stored in a dataset containing tables that follow a specific schema. Here are some of the main fields you’ll encounter:

  • event_name: The name of the event (e.g., page_view, purchase).
  • user_pseudo_id: A unique identifier for a user across sessions.
  • event_timestamp: The time the event was triggered.
  • event_params: A repeated (array) field storing additional details for each event (e.g., page URL, session ID).
  • device, geo, traffic_source: Nested records containing device, location, and traffic source data, respectively.

GA4 data tables are organized by date, meaning each day has its own table. For example, data from 20241101 (November 1, 2024) would be in a table named with…

--

--

Maïssa
Maïssa

Written by Maïssa

Digital Analytics Professional. SQL, R. Data Clarity Advocate 🦦

No responses yet