ga4-bigquery-schema

Explain the GA4 BigQuery Export Schema with table structure and nested fields.

90|10|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ga4-bigquery-schema
Source: https://github.com/cognyai/claude-code-marketing-skills/tree/main/skills/ga4-bigquery-schema
Command: npx skills add https://github.com/cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The GA4 BigQuery export schema is a comprehensive reference that helps data teams understand table structures, nested fields, and data types so they can write accurate, performant queries without chasing scattered docs.

Core Features & Use Cases

  • Detailed reference of GA4 BigQuery export schema including tables, nested fields, and data types.
  • Provides examples of common queries for event_params, user_properties, ecommerce, and revenue analysis.
  • Useful for documenting schema definitions, guiding data modeling, and troubleshooting GA4 BigQuery exports.

Quick Start

Run the /ga4-bigquery-schema command to view the full schema overview.

Frequently Asked Questions about ga4-bigquery-schema

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query nested event_params fields in the GA4 BigQuery export schema?

To query event_params in the GA4 BigQuery export schema, you must unnest the repeated record using UNNEST(event_params) in your SQL. This flattens the nested key-value structure so analysts can extract specific parameters like page_location or ga_session_id efficiently.

What is the structure of user_properties in GA4 BigQuery exports?

User_properties in GA4 BigQuery exports are stored as nested, repeated records within the events table. Querying them requires unnesting the user_properties array to access the value fields, enabling analysts to segment users based on custom attributes.

How do I calculate ecommerce revenue from GA4 BigQuery data?

Calculating ecommerce revenue from GA4 BigQuery data involves querying the ecommerce events, unnesting event_params for items, and summing the purchase_revenue field. The schema reference provides common query examples to accurately aggregate this revenue data.

What are the best practices for writing performant queries against GA4 BigQuery exports?

Best practices for performant GA4 BigQuery queries include filtering by event_date or event_timestamp early to reduce data scanned, and carefully structuring UNNEST operations. The schema reference highlights these performance best practices for efficient data modeling.

Do I need prior BigQuery SQL knowledge to use the GA4 export schema reference?

Yes, you need foundational BigQuery SQL knowledge, particularly understanding nested and repeated records, to use the GA4 export schema reference effectively. It is designed for data analysts and engineers who model data and build queries across projects.