Files
our-claude-skills/ourdigital-custom-skills/21-gtm-manager
Andrew Yim eea49f9f8c refactor(skills): Restructure skills to dual-platform architecture
Major refactoring of ourdigital-custom-skills with new numbering system:

## Structure Changes
- Each skill now has code/ (Claude Code) and desktop/ (Claude Desktop) versions
- New progressive numbering: 01-09 General, 10-19 SEO, 20-29 GTM, 30-39 OurDigital, 40-49 Jamie

## Skill Reorganization
- 01-notion-organizer (from 02)
- 10-18: SEO tools split into focused skills (technical, on-page, local, schema, vitals, gsc, gateway)
- 20-21: GTM audit and manager
- 30-32: OurDigital designer, research, presentation
- 40-41: Jamie brand editor and audit

## New Files
- .claude/commands/: Slash command definitions for all skills
- CLAUDE.md: Updated with new skill structure documentation
- REFACTORING_PLAN.md: Migration documentation
- COMPATIBILITY_REPORT.md, SKILLS_COMPARISON.md: Analysis docs

## Removed
- Old skill directories (02-05, 10-14, 20-21 old numbering)
- Consolidated into new structure with _archive/ for reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 01:58:24 +09:00
..

OurDigital GTM Manager

Comprehensive Google Tag Manager management toolkit powered by Playwright.

Note

: For lightweight audit-only functionality, see 13-ourdigital-gtm-audit.

Features

  • Audit Mode: Validate GTM installations, dataLayer events, forms, and checkout flows
  • Inject Mode: Generate custom HTML tags for dataLayer pushes
  • Container Detection: Verify GTM installation, position, and duplicates
  • DataLayer Validation: Event structure, types, sequence checking
  • Form Tracking: Form discovery, field analysis, event verification
  • E-commerce Checkout: Full funnel flow simulation and validation
  • Multi-Platform: GA4, Meta Pixel, LinkedIn, Google Ads, Kakao, Naver
  • Notion Integration: Export audit results to Notion database

Installation

cd ourdigital-gtm-manager

# Install dependencies
pip install -r requirements.txt

# Install Playwright browsers
playwright install chromium

Audit Mode

Analyze existing GTM implementations:

# Full audit
python gtm_manager.py audit --url "https://yoursite.com" --journey full

# Specific container validation
python gtm_manager.py audit --url "https://yoursite.com" --container "GTM-XXXXXX"

# Form tracking only
python gtm_manager.py audit --url "https://yoursite.com/contact" --journey form

# Audit and generate missing tags
python gtm_manager.py audit --url "https://yoursite.com" --generate-tags

# Export to Notion
python gtm_manager.py audit --url "https://yoursite.com" --notion

Audit Options

Option Description Default
--url Target URL (required) -
--container Expected GTM container ID None
--journey pageview, scroll, form, checkout, datalayer, full full
--output Output file path gtm_audit_report.json
--generate-tags Generate missing dataLayer tags False
--notion Export to Notion database False

Inject Mode

Generate GTM custom HTML tags when you can't modify source code directly:

# List available event types
python gtm_manager.py inject --list-events

# Generate all ecommerce tags
python gtm_manager.py inject --preset ecommerce --output ./tags

# Generate specific events
python gtm_manager.py inject --event purchase --event add_to_cart

# Generate from audit report
python gtm_manager.py inject --from-audit gtm_audit_report.json

# Generate with DOM scraping code
python gtm_manager.py inject --event view_item --scrape

Inject Options

Option Description Default
--event Event type(s) to generate -
--preset ecommerce, engagement, all -
--from-audit Generate from audit report -
--output Output directory ./gtm_tags
--format html or json html
--currency Currency code KRW
--scrape Generate DOM scraping code False
--list-events Show available events -

Supported Events

Ecommerce: view_item, add_to_cart, remove_from_cart, view_cart, begin_checkout, add_shipping_info, add_payment_info, purchase

Forms: form_submit, form_start, generate_lead

Engagement: scroll, file_download, search, outbound_click, share

Video: video_start, video_progress, video_complete

User: login, sign_up, page_view

Notion Integration

# Set Notion API token
export NOTION_TOKEN="secret_xxxxx"

# Export audit to Notion
python gtm_manager.py audit --url "https://yoursite.com" --notion --notion-detailed

Using with Claude Code

This project includes a CLAUDE.md file optimized for Claude Code.

claude

# Then ask Claude:
> Run a GTM audit on https://example.com
> Generate ecommerce dataLayer tags for my site
> Check the checkout flow and create missing tags

Documentation

See docs/ folder for:

  • GA4 event specifications
  • E-commerce dataLayer schemas
  • Form tracking patterns
  • Checkout flow sequences
  • Common issues and fixes

License

MIT