Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

gtmGTM 搜索

Agent Skill

gtm 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

124

周安装

5

GitHub Stars

公开资料未说明

下载量

39
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gtm(GTM 搜索)
来源仓库:https://github.com/henkisdabro/wookstar-claude-code-plugins
仓库路径:skills/gtm
安装命令:
npx skills add henkisdabro/wookstar-claude-code-plugins --skill "gtm"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add henkisdabro/wookstar-claude-code-plugins --skill "gtm"

简介

gtm 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于需要从多个来源中筛选出与 GTM 相关的项目或文档的场景。
  • 通过关键词搜索并结合来源仓库进一步核验具体用法和实现细节。
  • 安装命令为 npx skills add henkisdabro/wookstar-claude-code-plugins --skill "gtm",建议确认权限范围和维护状态。
  • 使用前需评估是否会触发联网、命令执行或文件读写等操作。

SKILL.md

Google Tag Manager

Overview

This skill provides comprehensive expertise for Google Tag Manager (GTM), covering container setup, tag configuration, triggers, variables, data layer implementation, debugging, custom templates, and API automation. Whether you are implementing a new GTM setup, optimising an existing configuration, or troubleshooting issues, this skill has you covered.

When to Use This Skill

Invoke this skill when:

  • Setting up a new GTM container
  • Configuring tags (GA4, Google Ads, Facebook Pixel, etc.)
  • Creating triggers (page views, clicks, form submissions, etc.)
  • Defining variables (data layer, custom JavaScript, constants, etc.)
  • Implementing the data layer for e-commerce or custom events
  • Debugging GTM issues using Preview mode or Tag Assistant
  • Building custom templates with sandboxed JavaScript
  • Automating GTM operations via the REST API
  • Optimising container performance and organisation
  • Ensuring privacy compliance and consent management

Quick Start

Container Setup

  1. Create a GTM account at tagmanager.google.com
  2. Create a container (Web, iOS, Android, or Server)
  3. Install the container snippet on your website
  4. Configure tags, triggers, and variables
  5. Test in Preview mode
  6. Publish

See setup.md for detailed installation instructions.

Basic Tag Configuration

// Example: GA4 Configuration Tag
Tag Type: Google Analytics: GA4 Configuration
Measurement ID: G-XXXXXXXXXX
Trigger: All Pages

See tags.md for comprehensive tag documentation.

Data Layer Push

// Push custom event to data layer
window.dataLayer = window.dataLayer || [];
dataLayer.push({
  'event': 'custom_event',
  'category': 'engagement',
  'action': 'button_click',
  'label': 'CTA Button'
});

See datalayer.md for data layer patterns.

Core Concepts

Tags, Triggers, and Variables

Tags are snippets of code that execute on your site (e.g., GA4, Google Ads, Facebook Pixel).

Triggers define when tags fire (e.g., page views, clicks, form submissions).

Variables capture dynamic values for use in tags and triggers (e.g., page URL, click text, data layer values).

How They Work Together

User Action --> Trigger Fires --> Tag Executes --> Data Sent
     ^                                    |
     |                                    v
     +--- Variables provide values -------+

Topic Reference Guide

Container Setup and Installation

For container creation, snippet installation, and initial configuration:

  • Reference: setup.md
  • Topics: Container types, snippet placement, noscript fallback, verification

Tag Configuration

For configuring analytics, advertising, and custom tags:

  • Reference: tags.md
  • Topics: GA4 tags, Google Ads conversions, Facebook Pixel, custom HTML, tag sequencing

Trigger Types

For setting up firing conditions:

  • Reference: triggers.md
  • Topics: Page views, clicks, form submissions, custom events, trigger groups, blocking triggers

Variable Configuration

For capturing and formatting data:

  • Reference: variables.md
  • Topics: Built-in variables, data layer variables, custom JavaScript, URL variables, lookup tables

Data Layer Implementation

For implementing the data layer:

  • Reference: datalayer.md
  • Topics: Data layer structure, e-commerce tracking, SPA tracking, best practices

Debugging and Testing

For troubleshooting GTM implementations:

  • Reference: debugging.md
  • Topics: Preview mode, Tag Assistant, debug console, common issues, testing workflows

Best Practices

For naming conventions, performance, and security:

  • Reference: best-practices.md
  • Topics: Naming conventions, container organisation, performance optimisation, security, deployment strategies

Custom Templates

For building custom tag and variable templates:

  • Reference: custom-templates.md
  • Topics: Sandboxed JavaScript, template APIs, permissions, testing, publishing to Gallery

API Automation

For programmatic GTM management:

  • Reference: api.md
  • Topics: Authentication, REST API operations, bulk operations, backup/restore, CI/CD integration

Common Workflows

Implement GA4 Page View Tracking

  1. Create GA4 Configuration tag with Measurement ID
  2. Set trigger to "All Pages"
  3. Test in Preview mode
  4. Verify in GA4 DebugView
  5. Publish

Track Form Submissions

  1. Create Form Submission trigger
  2. Create GA4 Event tag with event name form_submit
  3. Add form ID/name as event parameter
  4. Test submission in Preview mode
  5. Publish

Implement E-commerce Tracking

  1. Implement data layer with e-commerce events
  2. Create data layer variables for product data
  3. Create GA4 Event tags for each e-commerce event
  4. Map data layer variables to event parameters
  5. Test complete purchase flow
  6. Publish

Debug Tag Not Firing

  1. Enable Preview mode
  2. Perform the action that should fire the tag
  3. Check "Tags Not Fired" section
  4. Review trigger conditions in Variables tab
  5. Check data layer for required values
  6. Fix conditions and retest

See debugging.md for detailed debugging workflows.

Technical Constraints

JavaScript (ES5 Requirement)

GTM Custom JavaScript Variables and Custom HTML Tags require ES5 syntax:

// Use var instead of const/let
var myVar = 'value';

// Use function instead of arrow functions
var myFunc = function(x) { return x * 2; };

// Use string concatenation instead of template literals
var message = 'Hello, ' + name;

Exception: Custom Templates support some ES6 features in their sandboxed environment.

Regular Expressions (RE2 Format)

GTM uses RE2 regex syntax, which differs from standard JavaScript regex:

Supported: Character classes, quantifiers, anchors, groups, alternation Not Supported: Lookahead, lookbehind, backreferences, possessive quantifiers

# Match product pages
^/products/[^/]+$

# Case-insensitive matching
(?i)^/checkout

Naming Conventions

Tags

Format: [Platform] - [Type] - [Description]

Examples:

  • GA4 - Event - Form Submit
  • Google Ads - Conversion - Purchase
  • FB - Pixel - Page View

Triggers

Format: [Event Type] - [Description]

Examples:

  • Click - CTA Button
  • Page View - Homepage
  • Form Submit - Contact Form

Variables

Format: [Type] - [Description]

Examples:

  • DL - User ID (Data Layer)
  • CJS - Format Price (Custom JavaScript)
  • Constant - GA4 Measurement ID

Performance Tips

  1. Use native tag templates instead of Custom HTML when possible
  2. Minimise Custom JavaScript execution time
  3. Remove unused tags, triggers, and variables regularly
  4. Use tag sequencing wisely to avoid unnecessary delays
  5. Defer non-critical tags to improve page load

Security Best Practices

  1. Vet all Custom HTML tags for malicious code
  2. Never push PII to the data layer - hash sensitive identifiers
  3. Implement consent mode for privacy compliance
  4. Limit container admin access to trusted users
  5. Review third-party templates before using

Quick Reference

Built-in Variables to Enable

  • Page URL, Page Path, Page Hostname
  • Click Element, Click Classes, Click ID, Click URL, Click Text
  • Form Element, Form ID, Form Classes
  • Scroll Depth Threshold, Scroll Direction

Common Trigger Types

  • Page View (All Pages, Some Pages)
  • Click (All Elements, Just Links)
  • Form Submission
  • Custom Event
  • History Change (for SPAs)
  • Timer
  • Scroll Depth

Essential Data Layer Events

// Page view
window.dataLayer.push({ 'event': 'page_view' });

// User login
window.dataLayer.push({ 'event': 'login', 'method': 'Google' });

// Purchase
window.dataLayer.push({
  'event': 'purchase',
  'ecommerce': {
    'transaction_id': 'T12345',
    'value': 99.99,
    'currency': 'AUD',
    'items': [...]
  }
});

Reference Files

TopicReference File
Container setupsetup.md
Tag configurationtags.md
Trigger configurationtriggers.md
Variable configurationvariables.md
Data layerdatalayer.md
Debuggingdebugging.md
Best practicesbest-practices.md
Custom templatescustom-templates.md
API automationapi.md

External Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

38.9%
按下载量换算15

Cursor

26.14%
按下载量换算10

Codex

15.7%
按下载量换算6

Claude Code

7.95%
按下载量换算3

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills