Skip to main content
skill CX Codex

gtm-setup — Claude Code skill for 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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add cognyai/claude-code-marketing-skills --skill gtm-setup -a claude-code
Open on GitHub

What gtm-setup 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.

What it helps with

  • 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 for the agent

  • 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.

How to install gtm-setup

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/gtm-setup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gtm-setup/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gtm-setup

How do I install gtm-setup in Claude Code?

Run npx skills add cognyai/claude-code-marketing-skills --skill gtm-setup -a claude-code. The skill file is at ~/.claude/skills/gtm-setup/SKILL.md.

What does gtm-setup do?

It guides event tracking setup in Google Tag Manager and GA4, including dataLayer events, triggers, variables, and debugging.

Can gtm-setup inspect my GTM container?

Yes, when Cogny MCP is connected, it can inspect the container’s tags, triggers, and variables. The reference guide itself works without connected accounts.

Similar skills

All skills for Marketing and content →

From the same set38

linkedin-micro-campaigns Turn a CRM-derived or manually supplied ICP into LinkedIn Ads targeting, audience estimates, and a campaign structure with creatives. CX Codex +1 ★ 111repo stars linkedin-launch-video Turns a brief or landing page into a LinkedIn-ready clip: burned-in captions, sound-off viewing, plain business language. Can hand the creative to LinkedIn Ads. CX Codex +1 ★ 111repo stars lead-qualification Research a prospect against your ideal customer profile, review company details and get a suggested next step. Use it for a single lead or a list. CX Codex +1 ★ 111repo stars landing-page-review Scores a landing page for conversion: headline, offer, buttons, trust signals. Useful when you are about to change a page on a hunch. CX Codex +1 ★ 111repo stars gtm-monitor Diffs a Google Tag Manager container against last week: tags added, edited or removed, plus draft changes still sitting unpublished. CX Codex +1 ★ 111repo stars google-ads-scripts A reference for writing and debugging Google Ads Scripts in JavaScript, from GAQL queries to Sheets workflows. Use it to automate account tasks and reporting. CX Codex +1 ★ 111repo stars google-ads-monitor Runs a weekly pass over your ad accounts and shows what moved: spend, conversions, CPA and ROAS against the previous week. CX Codex +1 ★ 111repo stars gaql-reference This skill helps draft Google Ads GAQL queries and understand their resources, fields, and filters. Use it when building a report query or checking its structure. CX Codex +1 ★ 111repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor