ad-copy-writer
Generate ad copy variations for Google, Microsoft, Meta, LinkedIn, TikTok, Reddit, Snapchat and X Ads (plus Apple Search Ads…
GA4 BigQuery Export Schema Reference — complete field reference, nested structures, query patterns, and performance tips
Claude Code
$ npx -y skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema --agent claude-code
Codex
$ npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a codex -y
Cursor
$ npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a cursor -y
Gemini CLI
$ npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a gemini-cli -y
GitHub Copilot
$ npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a github-copilot -y
OpenCode
$ npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a opencode -y
Windsurf
$ npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a windsurf -y
name: ga4-bigquery-schema description: GA4 BigQuery Export Schema Reference — complete field reference, nested structures, query patterns, and performance tips version: "1.1.1" author: Cogny AI platforms: [] user-invocable: true argument-hint: "<query or topic>" allowed-tools: - WebSearch - Read - Write - Bash # Enhanced when connected via Cogny MCP (read-only) - mcp__cogny__list_integrations - mcp__cogny__refresh_mcp_discovery - mcp__cogny__list_datasets - mcp__cogny__list_tables - mcp__cogny__inspect_schema - mcp__cogny__execute_bigquery_sql - mcp__cogny__mcp__Google_Analytics_4__tool_list_account_summaries - mcp__cogny__mcp__Google_Analytics_4__tool_run_report
Complete reference guide to the Google Analytics 4 BigQuery export schema, including table structure, nested fields, common queries, and data processing best practices.
Full docs: https://cogny.com/docs/ga4-bigquery-export-schema
/ga4-bigquery-schema # Show full schema overview /ga4-bigquery-schema event_params # Explain event_params structure /ga4-bigquery-schema conversion funnel # Show conversion funnel query pattern /ga4-bigquery-schema ecommerce # Explain ecommerce fields
You are a GA4 BigQuery schema expert. Use this reference to help users understand the GA4 export schema, write correct BigQuery SQL queries against GA4 data, and follow performance best practices.
When the user asks a question, find the relevant section below and provide precise, actionable answers with ready-to-use SQL examples.
If the user provides a specific topic as an argument, focus on that area. Otherwise, provide an overview of the schema structure.
Works with zero accounts: every query below is copy-paste SQL. When connected:
| Job | Solo / no account | Cogny Cloud | Plus GA4 connected | |-----|-------------------|-------------|--------------------| | Find the export dataset | user supplies `project.analytics_ID` | `list_datasets` → `list_tables` | — | | Check the real schema | the reference below | `inspect_schema` | — | | Run a query | user runs it | `execute_bigquery_sql` (read-only SELECTs) | — | | Reconcile export vs UI | — | `execute_bigquery_sql` | `tool_run_report` (same dates) |
BigQuery tools are Cloud-only (section 2 of `../marketing-engineer/references/mcp-routing.md`). On Solo, give the SQL and stop.
If Cogny isn't connected, skip this and note what connecting adds.
1. `list_datasets`, pick the one named `analytics_<property id>`; `list_tables` to confirm daily `events_*` tables exist (and `events_intraday_*` if streaming is on). 2. `inspect_schema` on one daily table before writing SQL; custom `event_params` keys and `user_properties` vary per property. 3. Swap `project.analytics_123456789` in the chosen query for the real path, keep the `_TABLE_SUFFIX` filter, then `execute_bigquery_sql`. 4. **Reconcile** (GA4 connected): run `tool_run_report` (`property_id`, same `date_ranges`, `metrics: [eventCount, totalUsers]`, `dimensions: [eventName]`) next to the export count. A gap under ~2% is normal (late hits, thresholding); a larger one, or users far apart, usually means consent mode modelling in the UI or a broken export day (see Data Quality Checks). Name the source on every number.
---
Google Analytics 4 exports raw event data to BigQuery in a nested, denormalized format.
**Daily Tables:** `analytics_PROPERTY_ID.events_YYYYMMDD` **Intraday Tables:** `analytics_PROPERTY_ID.events_intraday_YYYYMMDD`
Each row represents a single event with nested fields for event parameters, user properties, and e-commerce data.
-- View table schema SELECT column_name, data_type, description FROM `project.analytics_123456789.INFORMATION_SCHEMA.COLUMNS` WHERE table_name LIKE 'events_%' ORDER BY ordinal_position
| Field | Type | Description | |-------|------|-------------| | `event_date` | STRING | Date when the event was logged (YYYYMMDD format) | | `event_timestamp` | INTEGER | Time when the event was logged (microseconds since Unix epoch) | | `event_name` | STRING | Name of the event (e.g., 'page_view', 'purchase') | | `event_params` | ARRAY\<STRUCT\> | Array of event parameters | | `event_previous_timestamp` | INTEGER | Timestamp of previous event by this user | | `event_value_in_usd` | FLOAT | Value of the event in USD | | `event_bundle_sequence_id` | INTEGER | Sequential ID of the event bundle | | `event_server_timestamp_offset` | INTEGER | Timestamp offset between collection and server | | `user_id` | STRING | User ID set via setUserId API | | `user_pseudo_id` | STRING | Pseudonymous ID for the user (cookie-based) | | `user_properties` | ARRAY\<STRUCT\> | Array of user properties | | `user_first_touch_timestamp` | INTEGER | First time user visited (microseconds) | | `user_ltv` | STRUCT | User lifetime value information | | `device` | STRUCT | Device information | | `geo` | STRUCT | Geographic information | | `app_info` | STRUCT | App information (mobile apps) | | `traffic_source` | STRUCT | First-touch source that acquired the **user** (never changes) | | `collected_traffic_source` | STRUCT | UTMs / click IDs collected on **this event** | | `session_traffic_source_last_click` | STRUCT | Last-click attributed **session** source (manual, Google Ads, CM360, DV360, SA360) | | `stream_id` | STRING | Numeric ID of the data stream | | `platform` | STRING | Platform (web, ios, android) | | `ecommerce` | STRUCT | E-commerce transaction data | | `items` | ARRAY\<STRUCT\> | Array of item (product) details |
Event parameters stored as key-value pairs:
STRUCT<
key STRING,
value STRUCT<
string_value STRING,
int_value INT64,
float_value FLOAT64,
double_value FLOAT64
>
>**Common event parameters:**
AI marketing skills for Claude Code, Cursor, Windsurf, and other AI coding tools. Audit SEO, analyze ads, research competitors, qualify leads — all from your terminal. Free skills need no account. Premium skills connect your real data for $9/mo.
Generate ad copy variations for Google, Microsoft, Meta, LinkedIn, TikTok, Reddit, Snapchat and X Ads (plus Apple Search Ads…
Enforce a pre-declared evidence bar on every ad — after it spends enough, pause it if it misses (e.g. CTR < 1% or cost per lead…
Build a portable brand-kit.json for the user's product — colors, typography, voice — that other skills (video, ad creative,…
Find accounts where something just happened that creates demand — funding, hiring, new locations, launches, rising ad engagement…
Give every campaign an ID and carry it everywhere — allocate IDs, audit ad/email/UTM naming across Google, Meta, LinkedIn, Bing,…
Re-read every lost deal in your CRM (HubSpot, Pipedrive or Upsales; Salesforce via the CRM layer) with its calls, meetings and…
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use…
Comprehensive SEO analysis for any website or business type. Full site audits, single-page analysis, technical SEO (crawlability,…
Turn the current project website into a short, polished, shareable launch video using Hyperframes. Use when someone says "/brag",…
Full website GEO+SEO audit with parallel subagent delegation. Orchestrates a comprehensive Generative Engine Optimization audit…