---
description: Gtm Audit command
---

# GTM Audit

Lightweight Google Tag Manager audit tool.

## Triggers
- "audit GTM", "check dataLayer", "GTM 검사"

## Capabilities

1. **Container Analysis** - Tags, triggers, variables inventory
2. **DataLayer Validation** - Check event structure
3. **Form Tracking** - Verify form submission events
4. **E-commerce Check** - Validate purchase/cart events

## Scripts

```bash
# Audit GTM container
python /Users/ourdigital/Projects/our-claude-skills/custom-skills/20-gtm-audit/code/scripts/gtm_audit.py \
  --url https://example.com

# With detailed dataLayer check
python /Users/ourdigital/Projects/our-claude-skills/custom-skills/20-gtm-audit/code/scripts/gtm_audit.py \
  --url https://example.com --check-datalayer --output report.json
```

## Audit Checklist

### Container Health
- [ ] GTM container loads correctly
- [ ] No JavaScript errors from GTM
- [ ] Container ID matches expected

### DataLayer Events
- [ ] `page_view` fires on all pages
- [ ] `purchase` event has required fields
- [ ] Form submissions tracked

### Common Issues
- Missing ecommerce object
- Incorrect event names (GA4 format)
- Duplicate event firing
