GTM Setup Verification Guide
Method 1: GTM Preview Mode (Most Comprehensive)
Step-by-Step Instructions:
Open GTM Console
Enable Preview Mode
- Click the "Preview" button in the top-right corner
- GTM will generate a preview URL
Test Your Website
- Open the preview URL in a new tab
- Your website will load with GTM debug panel at the bottom
Verify Events
- The debug panel shows all events being fired
- You should see events like:
page_view
form_field_focus
button_click
scroll_depth
section_view
Test Interactions
- Fill out the form
- Click buttons
- Scroll through the page
- Navigate between sections
- Watch events appear in real-time
Method 2: Browser Developer Tools
Check GTM Container Loading:
- Open Developer Tools (F12)
- Go to Network Tab
- Refresh the page
- Look for GTM requests:
googletagmanager.com/gtm.js
googletagmanager.com/gtm.js?id=GTM-5XFLRN8P
Check dataLayer:
- Open Console Tab
- Type:
window.dataLayer
- Press Enter
- You should see an array with events
Test Event Tracking:
// In browser console, test manually:
window.dataLayer.push({
'event': 'test_event',
'event_category': 'test',
'event_action': 'verification'
});
Method 3: GTM Container Verification
Check Container Code:
Verify Head Code (in index.html):
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5XFLRN8P');</script>
<!-- End Google Tag Manager -->
Verify Body Code (in index.html):
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5XFLRN8P"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Method 4: Event-Specific Testing
Test Each Event Type:
Page View Event:
- Open website
- Check console for:
GTM Event: page_view
Form Events:
- Click on form fields
- Submit the form
- Check for:
form_field_focus, form_submission, form_success
Button Events:
- Click various buttons
- Check for:
button_click, cta_button_click, demo_button_click
Navigation Events:
- Click navigation links
- Check for:
navigation_click
Scroll Events:
- Scroll through the page
- Check for:
scroll_depth, section_view
Method 5: GTM Container Status Check
In GTM Console:
Container Status:
- Should show "Published" status
- Check for any errors in container
Tags Configuration:
- Verify tags are set up to trigger on your events
- Check tag firing rules
Triggers:
- Ensure triggers are configured for your events
- Test trigger conditions
Variables:
- Verify data layer variables are set up
- Check variable configurations
Method 6: Real-Time Testing
Using Google Analytics (if connected):
- Open Google Analytics
- Go to Real-Time > Events
- Interact with your website
- Watch events appear in real-time
Using GTM Real-Time:
- In GTM Console
- Go to Preview Mode
- Interact with website
- Watch events in debug panel
Common Issues & Solutions
Issue 1: GTM Not Loading
Symptoms: No GTM requests in Network tab
Solutions:
- Check container ID is correct
- Verify GTM code is in
<head> section
- Check for JavaScript errors
Issue 2: Events Not Firing
Symptoms: No events in dataLayer
Solutions:
- Check JavaScript console for errors
- Verify
trackEvent function is working
- Test with manual dataLayer.push()
Issue 3: Events Firing but Not Reaching GTM
Symptoms: Events in dataLayer but not in GTM
Solutions:
- Check GTM container is published
- Verify trigger configurations
- Test in preview mode
Issue 4: Duplicate Events
Symptoms: Same event firing multiple times
Solutions:
- Check for duplicate event listeners
- Verify event tracking logic
- Use event deduplication in GTM
✅ Verification Checklist
- [ ] GTM container loads without errors
- [ ] dataLayer is accessible in console
- [ ] Page view event fires on load
- [ ] Form events fire on interaction
- [ ] Button click events fire
- [ ] Scroll depth events fire
- [ ] Navigation events fire
- [ ] Events appear in GTM preview mode
- [ ] No JavaScript errors in console
- [ ] GTM container is published
️ Debugging Commands
Console Commands for Testing:
// Check if GTM is loaded
console.log('GTM Loaded:', typeof window.dataLayer !== 'undefined');
// Check dataLayer contents
console.log('DataLayer:', window.dataLayer);
// Manually trigger an event
window.dataLayer.push({
'event': 'manual_test',
'event_category': 'debug',
'event_action': 'console_test'
});
// Check GTM container ID
console.log('GTM ID:', 'GTM-5XFLRN8P');
// Test trackEvent function
if (typeof trackEvent === 'function') {
trackEvent('test_event', {test: true});
}
Expected Events in GTM
When testing, you should see these events:
Page Load:
Form Interactions:
form_field_focus
form_field_blur
form_submission
form_success
Button Clicks:
button_click
cta_button_click
demo_button_click
Navigation:
User Engagement:
scroll_depth
section_view
user_engagement
Carousel:
External Links:
Next Steps After Verification
- Set up GTM Triggers for each event
- Configure Tags (Google Analytics, Facebook Pixel, etc.)
- Test in Production environment
- Monitor Real-Time Data
- Set up Conversion Tracking
- Configure Enhanced Ecommerce (if applicable)