# gtm-setup

A reference for Google Tag Manager events and GA4 setup. Use it to shape a dataLayer event, choose a trigger, or troubleshoot tracking.

- 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/gtm-setup/SKILL.md
- Updated: 2026-10-12
- HTML: https://affpapa.org/en/nevibecode/skills/gtm-setup

## What it does

gtm-setup answers questions about Google Tag Manager event tracking, from dataLayer behavior to trigger and variable types, GA4 tags, and debugging. Ask about a particular topic, such as purchase tracking or common implementation mistakes, and it can provide code examples.

The guide works without connected accounts. With Cogny MCP connected, it can inspect a GTM container and review its tags, triggers, and variables; GA4 tools can help verify incoming events. GTM recursively merges nested objects, so old ecommerce values can carry into later events. Clear them by pushing `ecommerce: null` before the next ecommerce event.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install cognyai/claude-code-marketing-skills gtm-setup
```

2. **Manually: put the files in place**
- File: `.github/skills/gtm-setup/SKILL.md`

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add cognyai/claude-code-marketing-skills --skill gtm-setup -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/gtm-setup/SKILL.md

## When to use it
- build a purchase event with `dataLayer.push()`
- choose a trigger and configure a GA4 tag
- trace a variable that reads an outdated value
- inspect the tags and triggers in a GTM container
- debug missing or duplicated tracking events

## Example prompts
- Show me a `dataLayer.push()` example for a purchase event.
- Explain which GTM trigger fits a form submission event.
- Inspect the tags and variables in my GTM container.

## Similar
- [seo-audit](https://affpapa.org/en/nevibecode/skills/coreyhaines31-seo-audit.md) — skill · 238500 installs
- [programmatic-seo](https://affpapa.org/en/nevibecode/skills/coreyhaines31-programmatic-seo.md) — skill · 150800 installs
- [copy-editing](https://affpapa.org/en/nevibecode/skills/coreyhaines31-copy-editing.md) — skill · 149800 installs
- [marketing-ideas](https://affpapa.org/en/nevibecode/skills/coreyhaines31-marketing-ideas.md) — skill · 147400 installs
- [sales-enablement](https://affpapa.org/en/nevibecode/skills/sales-enablement.md) — skill · 119400 installs
- [revops](https://affpapa.org/en/nevibecode/skills/revops.md) — skill · 114000 installs

From the same set: [cognyai/claude-code-marketing-skills](https://affpapa.org/en/nevibecode/by/cognyai/claude-code-marketing-skills.md) — 38 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
