# ga4-bigquery-schema

A reference for the GA4 BigQuery export schema: nested fields, ready-to-use SQL patterns and performance notes. Handy when you need to unpack event_params or build a funnel query.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 111
- Author: Cogny AI
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cognyai/claude-code-marketing-skills/tree/HEAD/skills/ga4-bigquery-schema/SKILL.md
- Updated: 2026-10-12
- HTML: https://affpapa.org/en/nevibecode/skills/ga4-bigquery-schema

## What it does

The skill answers questions about how GA4 exports data to BigQuery and hands back SQL you can run. It covers top-level fields such as `event_date`, `event_name`, `user_pseudo_id`, `ecommerce` and `items`, the nested `event_params` and `user_properties` structures, and query patterns for conversion funnels, e-commerce fields and pulling a single parameter out with `UNNEST`.

You call it as a slash command with a topic argument: `/ga4-bigquery-schema event_params` walks through the parameter structure, `/ga4-bigquery-schema conversion funnel` returns the funnel pattern. With no argument it gives a schema overview. Allowed tools include `WebSearch`, `Read`, `Write`, `Bash` and a set of read-only Cogny MCP calls: `list_datasets`, `list_tables`, `inspect_schema`, `execute_bigquery_sql`, plus Google Analytics 4 tools for reconciling reports.

Running queries through MCP only works in Cogny Cloud. On Solo the skill stops at handing you the SQL. Call `inspect_schema` on one daily table before writing anything: the key sets inside `event_params` and `user_properties` differ per property, so skipping that step is how you end up with an empty result set.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ga4-bigquery-schema/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ga4-bigquery-schema/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ga4-bigquery-schema/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ga4-bigquery-schema/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install cognyai/claude-code-marketing-skills ga4-bigquery-schema
```

2. **Manually: put the files in place**
- File: `.github/skills/ga4-bigquery-schema/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/cognyai/claude-code-marketing-skills --path skills/ga4-bigquery-schema
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ga4-bigquery-schema/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add cognyai/claude-code-marketing-skills --skill ga4-bigquery-schema -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/cognyai/claude-code-marketing-skills/tree/HEAD/skills/ga4-bigquery-schema/SKILL.md

## When to use it
- unpack `event_params` and pull a specific key with `UNNEST`
- write SQL for a conversion funnel over GA4 events
- locate e-commerce fields in the export and join them to `items`
- compare event counts from the export against a GA4 report
- check the real schema of a daily table before querying

## Example prompts
- Show me the `event_params` structure and how to extract `page_location`
- Give me a query pattern for a conversion funnel
- Explain the `ecommerce` fields in the GA4 export

## Similar
- [bigquery-basics](https://affpapa.org/en/nevibecode/skills/bigquery-basics.md) — skill · 17678 installs
- [bigquery-ai-ml](https://affpapa.org/en/nevibecode/skills/bigquery-ai-ml.md) — skill · 7033 installs
- [looker-studio-bigquery](https://affpapa.org/en/nevibecode/skills/looker-studio-bigquery.md) — skill · 389 installs
- [bigquery-mcp](https://affpapa.org/en/nevibecode/mcp/bigquery-mcp.md) — MCP server · ★ 10
- [data-analytics](https://affpapa.org/en/nevibecode/plugins/data-analytics.md) — plugin · ★ 7604
- [bigquery-pipeline-audit](https://affpapa.org/en/nevibecode/skills/bigquery-pipeline-audit.md) — skill · 8800 installs

From the same set: [cognyai/claude-code-marketing-skills](https://affpapa.org/en/nevibecode/by/cognyai/claude-code-marketing-skills.md) — 18 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
