Tags
All tag types and configuration options in Google Tag Manager.
Tags Overview
Tags are the core output of GTM—they're the code snippets that send data to analytics platforms, advertising networks, and other third-party tools.
Tag Anatomy
Every tag has:
├── Tag Type (GA4, Google Ads, Custom HTML, etc.)
├── Configuration (what data to send)
├── Triggering (when to fire)
├── Exception Triggers (when NOT to fire)
├── Tag Sequencing (fire before/after other tags)
└── Firing Options (once per page, unlimited, etc.)Tag Categories
| Category | Examples | |----------|----------| | Analytics | GA4, Adobe Analytics, Mixpanel | | Advertising | Google Ads, Meta Pixel, LinkedIn | | Remarketing | Google Ads Remarketing, Criteo | | Personalization | Optimizely, VWO, Google Optimize | | Utilities | Custom HTML, Custom Image |
GA4 Tags
GA4 Configuration Tag
The foundation tag—must fire on all pages:
Tag Type: Google Tag
Configuration:
├── Tag ID: G-XXXXXXXXXX (your Measurement ID)
├── Configuration Settings
│ ├── send_page_view: true (or false for SPAs)
│ ├── debug_mode: true (for testing)
│ └── user_properties: (optional)
└── Trigger: All PagesGA4 Event Tag
For tracking specific actions:
Tag Type: Google Analytics: GA4 Event
Configuration:
├── Measurement ID: G-XXXXXXXXXX
├── Event Name: add_to_cart (use recommended names)
├── Event Parameters:
│ ├── items: {{DLV - ecommerce.items}}
│ ├── value: {{DLV - ecommerce.value}}
│ └── currency: USD
└── Trigger: Add to Cart ClickRecommended Event Names
| Event | Use Case | |-------|----------| | generate_lead | Form submissions | | sign_up | Account creation | | login | User authentication | | add_to_cart | E-commerce cart | | begin_checkout | Checkout start | | purchase | Transaction complete | | search | Site search | | view_item | Product page view |
Google Ads Tags
Conversion Tracking Tag
Tag Type: Google Ads Conversion Tracking
Configuration:
├── Conversion ID: AW-XXXXXXXXX
├── Conversion Label: AbCdEfGhIjKlMn
├── Conversion Value: {{DLV - transaction.value}}
├── Currency Code: USD
├── Order ID: {{DLV - transaction.id}}
└── Trigger: Purchase Confirmation PageRemarketing Tag
Tag Type: Google Ads Remarketing
Configuration:
├── Conversion ID: AW-XXXXXXXXX
├── Custom Parameters:
│ ├── ecomm_prodid: {{Product ID}}
│ ├── ecomm_pagetype: {{Page Type}}
│ └── ecomm_totalvalue: {{Cart Value}}
└── Trigger: All PagesEnhanced Conversions
For better conversion measurement:
├── Collect user-provided data (email, phone)
├── Hash automatically before sending
├── Improves cross-device attribution
├── Works with iOS privacy restrictions
Setup:
Tag → Conversion Tracking → Include user-provided dataMeta Pixel Tags
Base Pixel Code
Tag Type: Custom HTML
HTML:
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
Trigger: All PagesMeta Event Tags
Tag Type: Custom HTML
For Lead event:
<script>
fbq('track', 'Lead', {
content_name: {{Form Name}},
content_category: {{Page Category}}
});
</script>
Trigger: Form Submission - Thank YouStandard Meta Events
| Event | Parameters | |-------|------------| | Lead | content_name, content_category | | CompleteRegistration | content_name, status | | AddToCart | content_ids, content_type, value, currency | | InitiateCheckout | content_ids, value, currency, num_items | | Purchase | content_ids, value, currency, content_type | | ViewContent | content_ids, content_type, value |
Custom HTML Tags
When to Use Custom HTML
Use Custom HTML for:
├── Third-party tools without GTM templates
├── Custom tracking code
├── A/B testing scripts
├── Chat widgets
├── Survey tools
├── Heatmap tools (Hotjar, Clarity)Best Practices for Custom HTML
<!-- Always wrap in script tags -->
<script>
// Your code here
// Use try-catch to prevent errors breaking other tags
try {
// Custom tracking logic
} catch(e) {
console.error('GTM Custom Tag Error:', e);
}
</script>Document.write Warning
⚠️ Tags using document.write() require:
Tag → Advanced Settings →
"Support document.write" = enabled
Note: Can impact page performanceBest Practices
Naming Conventions
Format: [Platform] - [Type] - [Description]
Examples:
├── GA4 - Config - All Pages
├── GA4 - Event - Purchase
├── GAds - Conversion - Lead Form
├── GAds - Remarketing - All Pages
├── Meta - Base Pixel
├── Meta - Event - Add to Cart
├── LinkedIn - Insight TagTag Sequencing
For tags that depend on others:
Tag Settings → Tag Sequencing
Example:
GA4 Event → "Setup Tag: GA4 Config"
(Ensures config loads before events)Firing Options
| Option | Use Case | |--------|----------| | Once per page | Config tags, base pixels | | Once per event | Most event tags | | Unlimited | Real-time tracking needs |
Common Mistakes to Avoid
❌ Firing tags on wrong pages
❌ Hardcoding values that should be variables
❌ Not testing in Preview mode
❌ Forgetting tag sequencing dependencies
❌ Using document.write without enabling support
❌ Not using try-catch in Custom HTMLPro Tip: Use GTM's built-in tag templates whenever possible—they're more reliable and easier to configure than Custom HTML equivalents.