Fix Tracking Events Not Firing on Textpattern CMS | OpsBlu Docs

Fix Tracking Events Not Firing on Textpattern CMS

Diagnose and fix GA4, GTM, and pixel events not firing on Textpattern CMS. Covers installation verification, Textpattern CMS-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.

Textpattern CMS-Specific Issues

  • Templates are stored in the database — verify your changes saved correctly
  • Textpattern's tag parser processes the entire template — check that GTM code isn't inside a conditional <txp:if_...> tag that evaluates to false
  • Page vs Form templates — ensure GTM is in the Page template, not a Form that may not be included on every page

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?