gtm-test

Execute predefined GTM preview mode test cases and validate dataLayer and GA4 events.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/matsumuratk/gtm-autotester --skill gtm-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gtm-test
Source: https://github.com/matsumuratk/gtm-autotester/tree/main/.claude/skills/gtm-test
Command: npx skills add https://github.com/matsumuratk/gtm-autotester --skill gtm-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the process of testing Google Tag Manager (GTM) configurations by executing predefined test cases in preview mode, ensuring accurate data layer and event tracking.

Core Features & Use Cases

  • Automated GTM Testing: Executes test cases defined in case.md files.
  • Data Validation: Verifies dataLayer contents and GA4 event transmissions against expected values.
  • Log Generation: Creates detailed GTM event logs and session exports for analysis.
  • Use Case: A marketing team can use this Skill to automatically verify that all e-commerce tracking events (like add_to_cart or purchase) are firing correctly with the right parameters after a website update, before going live.

Quick Start

Run the gtm-test skill with the test folder 'tests/sample-ec-1'.

Frequently Asked Questions about gtm-test

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

FAQPage Schema
How do I automate Google Tag Manager preview mode testing?

You can automate Google Tag Manager preview mode testing by executing predefined test cases from a `case.md` file, which validates dataLayer, GTM events, and GA4 events automatically.

Can I validate GA4 events and dataLayer values automatically with GTM?

Yes, you can validate GA4 event transmissions and dataLayer contents by running automated test cases that compare actual fired events against expected values defined in your test file.

How do I generate GTM event logs and session exports for analysis?

You can generate detailed GTM event logs and session exports by executing automated preview mode test cases, which produce comprehensive test reports for tracking analysis.

Do I need Chrome DevTools MCP to test GTM configurations?

Yes, you need Chrome DevTools MCP and access to the specified GTM container and website to execute automated preview mode tests and validate your event tracking configurations.

What is the best way to verify e-commerce tracking events in GTM?

The best way to verify e-commerce tracking events like add_to_cart or purchase is by automating GTM preview tests that validate event parameters against expected values before going live.

Why does my GTM dataLayer testing return inconsistent results?

Inconsistent GTM dataLayer testing results often occur when test cases are not properly defined in the `case.md` file or when the automated validation lacks access to the correct GTM container.