GTM Event Tracking & Setup Reference — dataLayer fundamentals, trigger types, variable types, GA4 tag configuration, debug mode, and best practices

No licenceAuto-check: notesMarketing & SEO

Install Gtm Setup

skills CLI
$ npx skills add cognyai/claude-code-marketing-skills --skill gtm-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cognyai/claude-code-marketing-skills gtm-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cognyai/claude-code-marketing-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/gtm-setup .claude/skills/gtm-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gtm-setup
GitHub stars
104
Token cost
~4.8k tokens
SKILL.md length
1,310 words
Files
1
Skills in repo
47
Repo updated
First seen
Licence
None found

At a glance

GTM Event Tracking & Setup Reference — dataLayer fundamentals, trigger types, variable types, GA4 tag configuration, debug mode, and best practices

  • Works in 9 steps: Race Conditions → Incorrect Trigger Firing → Missing ecommerce Null Reset → …
  • GA4 tag configuration
  • SKILL.md covers Usage, Instructions, dataLayer Fundamentals and Common dataLayer Events, plus 1 more section
  • Reaches youtube.com

What it does

Gtm Setup is an agent skill from cognyai/claude-code-marketing-skills. GTM Event Tracking & Setup Reference — dataLayer fundamentals, trigger types, variable types, GA4 tag configuration, debug mode, and best practices

Its SKILL.md is about 4.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Marketing & SEO, covering Go-to-market strategy and Product analytics. It works with Google Analytics. The repository describes itself as: Marketing skills for Claude Code — SEO audits and implementation, ad analysis, ad optimization. Free skills need no account. $9/mo for live Search Console, Bing & LinkedIn data.

When your agent uses it

  • GA4 tag configuration
  • Tasks that involve Go-to-market strategy
  • Tasks that involve Product analytics

Example prompts

  • “/gtm-setup”

Requirements

  • Pre-approved tools (allowed-tools): WebFetch, WebSearch, Bash, Read, Write, mcp__cogny__google_tag_manager__tool_list_accounts, mcp__cogny__google_tag_manager__tool_list_containers, mcp__cogny__google_tag_manager__tool_list_tags, mcp__cogny__google_tag_manager__tool_list_triggers, mcp__cogny__google_tag_manager__tool_list_variables, mcp__cogny__google_tag_manager__tool_get_tag, mcp__cogny__google_tag_manager__tool_get_trigger, mcp__cogny__google_tag_manager__tool_get_variable, mcp__cogny__google_tag_manager__tool_get_workspace_status, mcp__cogny__google_tag_manager__tool_search_tags

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Race Conditions
  2. Incorrect Trigger Firing
  3. Missing ecommerce Null Reset
  4. Duplicate Tags
  5. Custom HTML Breaking Pages
  6. Data Layer Variable Returns Undefined
  7. SPA Page Views Not Tracked
  8. Cross-Domain Tracking Issues
  9. Preview Traffic Inflating Analytics

What it can do on your machine

Read from SKILL.md and the folder at commit a062fb4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • WebFetch
    • WebSearch
    • Bash
    • Read
    • Write
    • mcp__cogny__google_tag_manager__tool_list_accounts
    • mcp__cogny__google_tag_manager__tool_list_containers
    • mcp__cogny__google_tag_manager__tool_list_tags
    • mcp__cogny__google_tag_manager__tool_list_triggers
    • mcp__cogny__google_tag_manager__tool_list_variables

    …and 5 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and html).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • youtube.com

    Also links to:

    • developers.google.com
    • cogny.com
    • tagmanager.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gtm Setup loads about 4.8k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 1,310 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~4.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: WebFetch, WebSearch, Bash, Read, Write, mcp__cogny__google_tag_manager__tool_list_accounts, mcp__cog

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 1,310 words (~4,846 tokens).

“Complete reference guide to Google Tag Manager event tracking, including dataLayer fundamentals, trigger and variable types, GA4 tag configuration, debug mode, and implementation best practices.”

— opening of SKILL.md by cognyai
name
gtm-setup
allowed-tools
WebFetch, WebSearch, Bash, Read, Write, mcp__cogny__google_tag_manager__tool_list_accounts, mcp__cogny__google_tag_manager__tool_list_containers, mcp__cogny__google_tag_manager__tool_list_tags, mcp__cogny__google_tag_manager__tool_list_triggers, mcp__cogny__google_tag_manager__tool_list_variables, mcp__cogny__google_tag_manager__tool_get_tag, mcp__cogny__google_tag_manager__tool_get_trigger, mcp__cogny__google_tag_manager__tool_get_variable, mcp__cogny__google_tag_manager__tool_get_workspace_status, mcp__cogny__google_tag_manager__tool_search_tags
version
1.0.0
author
Cogny AI
user-invocable
true
argument-hint
<topic or question>

Read the full SKILL.md on GitHub

Files

Just SKILL.md in skills/gtm-setup of cognyai/claude-code-marketing-skills.

Open the folder on GitHubat commit a062fb4

Compare with similar skills

Gtm Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gtm Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gtm Setup this skillcognyai/claude-code-marketing-skills104—~4.8kAutomated safety check: NotesNone
Tracking Schemajtrackingai/analytics-tracking-automation142—~1.1kAutomated safety check: PassApache-2.0
Analytics Trackingborghei/Claude-Skills886—~5.7kAutomated safety check: PassMIT
Analytics Tracking Automationjtrackingai/analytics-tracking-automation142—~2.8kAutomated safety check: PassApache-2.0
AnalyticsNexus-JPF/note-companion8707 repos~2.2kAutomated safety check: PassMIT
Tracking Discoverjtrackingai/analytics-tracking-automation142—~614Automated safety check: PassApache-2.0

Similar skills

  • Tracking Schema

    jtrackingai/analytics-tracking-automation

    A skill your agent uses when the user wants schema preparation, event design, selector validation, schema review, or event-spec generation.

    142 GitHub stars~1.1k tokensUpdated 5 mo ago
    Marketing & SEOAuto-check passed
  • Analytics Tracking

    borghei/Claude-Skills

    End-to-end analytics implementation for web and SaaS: GA4, Google Tag Manager, event taxonomy, conversion tracking, and UTM strategy.

    886 GitHub stars~5.7k tokensUpdated 2 days ago
    Marketing & SEOAuto-check passed
  • Analytics Tracking Automation

    jtrackingai/analytics-tracking-automation

    A skill your agent uses when you need GA4 + GTM tracking delivery from site discovery through publish, or when the right phase entry point is still unclear.

    142 GitHub stars~2.8k tokensUpdated 5 mo ago
    Data & AnalyticsAuto-check passed
  • Analytics

    Nexus-JPF/note-companion

    When the user wants to set up, improve, or audit analytics tracking and measurement.

    870 GitHub starsUsed in 7 repos~2.2k tokens
    Marketing & SEOAuto-check passed
  • Tracking Discover

    jtrackingai/analytics-tracking-automation

    A skill your agent uses when the user wants crawl coverage, platform detection, dataLayer discovery, or a fresh artifact directory before grouping and schema work.

    142 GitHub stars~614 tokensUpdated 5 mo ago
    Marketing & SEOAuto-check passed
  • Tracking Live Gtm

    jtrackingai/analytics-tracking-automation

    A skill your agent uses when the user wants to inspect the real live GTM runtime before schema generation or compare multiple live GTM containers.

    142 GitHub stars~721 tokensUpdated 5 mo ago
    Marketing & SEOAuto-check passed

More from cognyai/claude-code-marketing-skills

All 47 skills in this repo
  • Gtm Audit

    cognyai/claude-code-marketing-skills

    Google Tag Manager container audit — tag health, orphaned and paused tags, duplicate GA4 config, trigger coverage, Consent Mode, naming, workspace hygiene

    104 GitHub stars~1.6k tokensUpdated 3 mo ago
    Auto-check passed
  • Gtm Tracking Plan

    cognyai/claude-code-marketing-skills

    Turn a measurement plan into a Google Tag Manager spec — tags, triggers, variables, and copy-paste dataLayer snippets for every event

    104 GitHub stars~1.4k tokensUpdated 3 mo ago
    Auto-check: notes
  • Pre Send QA

    cognyai/claude-code-marketing-skills

    Pre-flight QA for an email campaign — merge tags, broken links, spam triggers, compliance, mobile rendering — before you hit send

    104 GitHub stars~2.2k tokensUpdated 3 mo ago
    Auto-check: notes
  • Brand Kit

    cognyai/claude-code-marketing-skills

    Build a portable brand-kit.json for the user's product — colors, typography, voice — that other skills (video, ad creative, landing page) can consume.

    104 GitHub stars~3.4k tokensUpdated 3 mo ago
    Auto-check: notes
  • Linkedin Launch Video

    cognyai/claude-code-marketing-skills

    Produce a LinkedIn-native 1:1 (or 16:9) launch video using HyperFrames.

    104 GitHub stars~2.7k tokensUpdated 3 mo ago
    Auto-check: notes
  • Reddit Launch Video

    cognyai/claude-code-marketing-skills

    Produce a Reddit-native 1:1 or 4:5 launch video using HyperFrames.

    104 GitHub stars~2.5k tokensUpdated 3 mo ago
    Auto-check: notes

Categories

Questions about Gtm Setup

What does Gtm Setup do?

GTM Event Tracking & Setup Reference — dataLayer fundamentals, trigger types, variable types, GA4 tag configuration, debug mode, and best practices. Gtm Setup is an agent skill from cognyai/claude-code-marketing-skills.

When should I use Gtm Setup?

Gtm Setup fits situations like: GA4 tag configuration; tasks that involve Go-to-market strategy; tasks that involve Product analytics.

How do I install Gtm Setup in Claude Code?

Run `npx skills add cognyai/claude-code-marketing-skills --skill gtm-setup -a claude-code`. Or copy the skill folder (skills/gtm-setup in cognyai/claude-code-marketing-skills) into .claude/skills/gtm-setup in your project. Claude Code loads it when a task matches its description.

How do I install Gtm Setup in Codex?

Run `npx skills add cognyai/claude-code-marketing-skills --skill gtm-setup -a codex`. Or copy the skill folder (skills/gtm-setup in cognyai/claude-code-marketing-skills) into .agents/skills/gtm-setup in your project. Codex loads it when a task matches its description.

Can I use Gtm Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cognyai/claude-code-marketing-skills --skill gtm-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gtm-setup, .gemini/skills/gtm-setup, .github/skills/gtm-setup and .opencode/skills/gtm-setup in your project.

What does Gtm Setup need to run?

SKILL.md names no scripts, command-line tools or credentials: Gtm Setup is instructions for the agent only. Its frontmatter pre-approves these tools: WebFetch, WebSearch, Bash, Read, Write, mcp__cogny__google_tag_manager__tool_list_accounts, mcp__cogny__google_tag_manager__tool_list_containers, mcp__cogny__google_tag_manager__tool_list_tags, mcp__cogny__google_tag_manager__tool_list_triggers, mcp__cogny__google_tag_manager__tool_list_variables, mcp__cogny__google_tag_manager__tool_get_tag, mcp__cogny__google_tag_manager__tool_get_trigger, mcp__cogny__google_tag_manager__tool_get_variable, mcp__cogny__google_tag_manager__tool_get_workspace_status, mcp__cogny__google_tag_manager__tool_search_tags.

Does Gtm Setup access the network?

SKILL.md names 4 domains. In commands or code: youtube.com; the agent is likely to contact it when it follows the instructions. As links in the text: developers.google.com, cogny.com and tagmanager.google.com. This is read from the text; nothing was executed.

Is Gtm Setup safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Gtm Setup use?

No licence was found for Gtm Setup or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Gtm Setup use?

About 4.8k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gtm Setup?

Skills that share tags, products or a category with Gtm Setup: Tracking Schema (jtrackingai/analytics-tracking-automation, 142 stars), Analytics Tracking (borghei/Claude-Skills, 886 stars), Analytics Tracking Automation (jtrackingai/analytics-tracking-automation, 142 stars) and Analytics (Nexus-JPF/note-companion, 870 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gtm Setup?

cognyai (a GitHub organization) maintains it in cognyai/claude-code-marketing-skills, which has 104 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on June 16, 2026.

Source: cognyai/claude-code-marketing-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.