Fix Tracking Events Not Firing on ExpressionEngine | OpsBlu Docs

Fix Tracking Events Not Firing on ExpressionEngine

Diagnose and fix GA4, GTM, and pixel events not firing on ExpressionEngine. Covers installation verification, ExpressionEngine-specific issues, and...

For universal debugging steps, see Global Events Not Firing Guide

Quick Diagnosis

1. Is the Tracking Script Loaded?

Open browser DevTools (F12) → Console and run:

// Check GTM
console.log('GTM:', typeof google_tag_manager !== 'undefined' ? 'Loaded' : 'NOT loaded');

// Check GA4 (gtag)
console.log('gtag:', typeof gtag === 'function' ? 'Loaded' : 'NOT loaded');

// Check Meta Pixel
console.log('Meta Pixel:', typeof fbq === 'function' ? 'Loaded' : 'NOT loaded');

// Check data layer
console.log('dataLayer:', window.dataLayer);

2. Are Events Being Pushed?

Monitor data layer pushes in real-time:

(function() {
  var orig = window.dataLayer.push;
  window.dataLayer.push = function() {
    console.log('DL push:', arguments[0]);
    return orig.apply(window.dataLayer, arguments);
  };
})();

Perform the action that should trigger an event (submit a form, click a button, etc.) and watch the console for output.

3. Check the Network Tab

DevTools → Networkfilter for:

  • googletagmanager.comGTM container loading
  • google-analytics.com/g/collectGA4 event hits
  • facebook.com/trMeta Pixel events

If these requests are missing, the tracking scripts aren't loading. If they appear but events are wrong, the issue is in your tag/trigger configuration.

ExpressionEngine-Specific Issues

  • Template caching can serve stale pages — clear cache after adding GTM code
  • EE's tag syntax {exp:...} won't conflict with GTM JavaScript, but nested template conditionals can accidentally exclude tracking code
  • Channel Entries loops may fire tracking code multiple times if GTM is inside a loop

Common Fixes

Ad Blockers

Ad blockers (uBlock Origin, AdBlock Plus, Brave browser) block GTM, GA4, and Meta Pixel by default. Test in an incognito/private window with extensions disabled to rule this out.

Consent/Cookie Banners

If you have a consent management platform (CMP), it may block tracking scripts until the user accepts cookies. Check your CMP configuration to ensure analytics scripts are allowed to fire (or that they fire correctly after consent is granted).

JavaScript Errors

A JavaScript error earlier in the page can prevent GTM and tracking scripts from executing. Check the browser Console for red errors — fix those first.

GTM Container Not Published

Changes in GTM only take effect after you click Submit → Publish. If you've added tags but haven't published, they won't fire on your live site.

Debugging Tools

  • GTM Preview Mode — click Preview in GTM to see which tags fire and which don't, with detailed reasons
  • GA4 DebugView — Admin → Data Display → DebugView shows events in real-time (requires debug mode enabled)
  • Meta Pixel Helper — Chrome extension that shows pixel fires and errors on any page
  • Tag Assistanttagassistant.google.com for verifying Google tags

Still Not Working?