gtm-setup

Configure Google Tag Manager event tracking with dataLayer, triggers, variables, and GA4.

90|10|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/cognyai/claude-code-marketing-skills --skill gtm-setup-cognyai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gtm-setup
Source: https://github.com/cognyai/claude-code-marketing-skills/tree/main/skills/gtm-setup
Command: npx skills add https://github.com/cognyai/claude-code-marketing-skills --skill gtm-setup-cognyai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill tackles the complexity of configuring Google Tag Manager for accurate event tracking, preventing data loss and debugging headaches in web analytics.

Core Features & Use Cases

  • dataLayer Fundamentals: Guides on pushing events like purchases and form submissions with code examples.
  • Triggers and Variables Setup: Explains all trigger types, variable configurations, and GA4 tag integration.
  • Debugging and Best Practices: Covers common mistakes, debug modes, and organization tips.
  • Use Case: For an e-commerce site, use it to implement purchase event tracking, ensuring all transaction data flows correctly to GA4 without duplicates or missing values.

Quick Start

Invoke the skill by asking for a full overview of GTM event tracking setup with /gtm-setup.

Frequently Asked Questions about gtm-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Google Tag Manager event tracking for GA4?

Google Tag Manager event tracking for GA4 requires configuring dataLayer pushes, creating specific triggers, defining variables, and linking your GA4 tag to capture precise user interaction data accurately.

How does the dataLayer work for pushing form submissions and purchases?

The dataLayer works by pushing JavaScript objects containing event names and transaction details, allowing Google Tag Manager triggers to capture form submissions and e-commerce purchases for GA4.

What is the best way to debug duplicate tag firings and race conditions in GTM?

Debugging duplicate tag firings and race conditions in GTM involves using built-in debug modes, reviewing trigger configurations, and validating dataLayer push sequences to ensure accurate event data collection.

Does Google Tag Manager support consent mode integration for web analytics?

Yes, Google Tag Manager supports consent mode integration, allowing you to configure tags that adjust tracking behavior based on user consent signals for web analytics and e-commerce sites.

Why are my GA4 purchase events missing transaction data in Google Tag Manager?

GA4 purchase events miss transaction data when dataLayer pushes lack required e-commerce parameters or when trigger variables are misconfigured, preventing complete transaction values from flowing correctly.

Can I use Google Tag Manager variables for lead generation site tracking?

Yes, you can use Google Tag Manager variables to track lead generation site interactions by capturing form element data and pushing custom events to GA4 for precise conversion measurement.