How to Fix Zyro Tracking Events Not Firing | OpsBlu Docs

How to Fix Zyro Tracking Events Not Firing

Fix GA4, GTM, and pixel events not firing on Zyro — integrations panel setup, custom code element injection, and site publish-state debugging

Tracking events not firing is a common issue. This guide helps you diagnose and fix tracking problems specific to Zyro websites.

Common Symptoms

  • GA4 not showing real-time data
  • Meta Pixel Helper shows errors or no pixel detected
  • GTM Preview mode shows tags not firing
  • Events appear in debugger but not in reports
  • Duplicate events firing
  • Events work on desktop but not mobile

Step-by-Step Diagnosis

Step 1: Verify Basic Prerequisites

Before debugging, check these fundamentals:

  • Paid Zyro plan: Free plan doesn't support custom code
  • Site is published: Tracking doesn't work in preview mode
  • Code is saved: Changes saved in Zyro Settings
  • Browser cache cleared: Hard reload (Ctrl+Shift+R)
  • Ad blockers disabled: Test without extensions

Step 2: Check Tracking Code Installation

For GA4

  1. View page source (Ctrl+U on your published site)
  2. Search (Ctrl+F) for your Measurement ID (G-XXXXXXXXXX)
  3. Verify code is present

If code is missing:

  • Go to Zyro Settings → Website code → Header code
  • Ensure GA4 code is pasted
  • Click Save
  • Click Publish

For Meta Pixel

  1. View page source (Ctrl+U)
  2. Search for your Pixel ID (15-16 digit number)
  3. Verify pixel code is present

If code is missing:

  • Go to Zyro Settings → Website code → Header code
  • Ensure Meta Pixel code is pasted
  • Click Save
  • Click Publish

For GTM

  1. View page source (Ctrl+U)
  2. Search for GTM- and your container ID
  3. Verify GTM code is present

If code is missing:

  • Go to Zyro Settings → Website code → Header code
  • Ensure GTM code is pasted
  • Click Save
  • Click Publish

Step 3: Check Browser Console for Errors

  1. Open your published Zyro site
  2. Press F12 to open Developer Tools
  3. Go to Console tab
  4. Look for errors (red text)

Common Errors:

"gtag is not defined"

Cause: GA4 not loaded

Fix:

  • Verify GA4 code in Header code
  • Check Measurement ID is correct
  • Ensure site is published
  • Check for JavaScript errors blocking GA4

"fbq is not defined"

Cause: Meta Pixel not loaded

Fix:

  • Verify pixel code in Header code
  • Check Pixel ID is correct
  • Ensure site is published
  • Test without ad blockers

"dataLayer is not defined"

Cause: GTM not loaded

Fix:

  • Verify GTM code in Header code
  • Check Container ID is correct
  • Ensure site is published

"Uncaught SyntaxError"

Cause: JavaScript syntax error in custom code

Fix:

  • Review custom code for syntax errors
  • Use a code validator
  • Check for missing brackets or quotes

Step 4: Verify Tracking Loads

Check Network Requests

  1. Open DevTools (F12)
  2. Go to Network tab
  3. Reload page
  4. Filter by:
    • GA4: collect or google-analytics
    • Meta Pixel: facebook or fbevents
    • GTM: googletagmanager

If no requests:

  • Tracking code not installed correctly
  • JavaScript error blocking load
  • Ad blocker preventing requests

If requests present:

  • Tracking is loading correctly
  • Issue may be with event triggers

Zyro-Specific Tracking Issues

Issue 1: Code Not Saved or Published

Problem: Added code to Settings but not saved/published.

Symptoms:

  • Code not in page source
  • No tracking requests in Network tab

Fix:

  1. Go to Settings → Website code
  2. Verify code is present
  3. Click Save
  4. Click Publish (top right)
  5. Wait for deployment (1-2 minutes)
  6. Test again

Issue 2: Code in Wrong Location

Problem: Code added to Footer instead of Header.

Symptoms:

  • Delayed tracking
  • Inconsistent firing
  • May work sometimes

Fix:

  • Move tracking code to Header code (not Footer)
  • Save and publish
  • Test again

Issue 3: Duplicate Tracking Code

Problem: Same tracking code added multiple times.

Symptoms:

  • Duplicate events
  • Inflated numbers
  • Multiple pixel detections

Fix:

  1. Check Header code for duplicates
  2. Check Footer code
  3. If using GTM, remove direct installations
  4. If using built-in integration, remove custom code
  5. Keep only ONE installation method

Issue 4: Plan Limitations

Problem: Using Zyro Free plan.

Limitation: Free plan doesn't support custom code.

Fix:

  • Upgrade to Unleash, eCommerce, or eCommerce Plus plan
  • Custom code requires paid plan

Issue 5: Zyro Template Changes

Problem: Template update broke tracking.

Symptoms:

  • Tracking worked before template change
  • Element selectors no longer work
  • Events stopped firing

Fix:

  • Review custom event tracking code
  • Update element selectors for new template
  • Test all event triggers
  • Use more generic selectors when possible

Platform-Specific Troubleshooting

GA4 Events Not Firing

Basic Pageviews Not Working

Diagnosis:

  1. Go to GA4 ReportsRealtime
  2. Visit your site in new tab
  3. Check if visit appears

If not appearing:

  1. Check Measurement ID is correct (G-XXXXXXXXXX)
  2. Verify code in Header (not Footer)
  3. Check browser console for errors
  4. Disable ad blockers
  5. Test in incognito mode

Custom Events Not Working

Diagnosis:

  1. Enable debug mode:
gtag('config', 'G-XXXXXXXXXX', {
  'debug_mode': true
});
  1. Go to GA4 AdminDebugView
  2. Trigger event on your site
  3. Check if event appears in DebugView

If not appearing:

  • Check event syntax: gtag('event', 'event_name')
  • Verify event trigger conditions
  • Check for JavaScript errors
  • Ensure gtag is loaded before event fires

Common Issues:

// Bad - gtag called before it's defined
gtag('event', 'test');

// Good - wait for gtag to load
document.addEventListener('DOMContentLoaded', function() {
  if (typeof gtag !== 'undefined') {
    gtag('event', 'test');
  }
});

Meta Pixel Events Not Firing

Base Pixel Not Working

Diagnosis:

  1. Install Meta Pixel Helper
  2. Visit your site
  3. Click Pixel Helper icon

If showing errors:

  • Check Pixel ID is correct
  • Verify pixel code format
  • Check for JavaScript errors
  • Test without ad blockers

Custom Events Not Working

Diagnosis:

  1. Go to Meta Events ManagerTest Events
  2. Visit your site
  3. Trigger event
  4. Check if event appears

Common Issues:

// Bad - fbq called before it's defined
fbq('track', 'Lead');

// Good - wait for fbq to load
document.addEventListener('DOMContentLoaded', function() {
  if (typeof fbq !== 'undefined') {
    fbq('track', 'Lead');
  }
});

GTM Tags Not Firing

Container Not Loading

Diagnosis:

  1. Open DevTools Console
  2. Type: google_tag_manager
  3. Press Enter

If undefined:

  • GTM code not installed correctly
  • Check Container ID (GTM-XXXXXXX)
  • Verify code in Header code
  • Check for JavaScript errors

Tags Not Firing in Preview Mode

Diagnosis:

  1. In GTM, click Preview
  2. Enter your published Zyro site URL
  3. Click Connect

If connection fails:

  • Ensure site is published (not preview)
  • Check GTM code is on page
  • Clear browser cache
  • Try different browser

If connected but tags not firing:

  • Check trigger conditions
  • Verify trigger type matches event
  • Check tag configuration
  • Review firing order

Form Tracking Issues

Zyro Forms Not Tracking

Problem: Form submissions not tracked.

Cause: Zyro forms may have specific structure.

Fix:

document.addEventListener('DOMContentLoaded', function() {
  // Target Zyro forms specifically
  const forms = document.querySelectorAll('form, .zyro-form, [data-qa="form"]');

  forms.forEach(function(form) {
    form.addEventListener('submit', function(e) {
      // GA4
      if (typeof gtag !== 'undefined') {
        gtag('event', 'form_submit', {
          'form_name': form.id || 'contact_form'
        });
      }

      // Meta Pixel
      if (typeof fbq !== 'undefined') {
        fbq('track', 'Lead');
      }
    });
  });
});

Form Redirects Too Quickly

Problem: Form submits and redirects before event fires.

Fix:

form.addEventListener('submit', function(e) {
  e.preventDefault(); // Prevent immediate redirect

  // Send event
  gtag('event', 'form_submit', {
    'event_callback': function() {
      form.submit(); // Submit after event sent
    },
    'event_timeout': 2000
  });
});

Mobile Tracking Issues

Events Work on Desktop But Not Mobile

Problem: Desktop tracking works, mobile doesn't.

Causes:

  • Mobile ad blockers more aggressive
  • Touch events vs click events
  • iOS tracking restrictions
  • Mobile browser differences

Fix:

// Handle both click and touch events
document.addEventListener('click', handleEvent);
document.addEventListener('touchend', handleEvent);

function handleEvent(e) {
  const button = e.target.closest('button');
  if (button) {
    gtag('event', 'button_click');
  }
}

iOS-Specific Issues:

  • Enable Google Consent Mode
  • Use Conversions API for Meta Pixel
  • Test on actual iOS devices

Testing Tools

Browser Extensions

Platform Tools

  • GA4 DebugView
  • Meta Events Manager Test Events
  • GTM Preview Mode

Console Testing

// Test if tracking is loaded
console.log('GA4:', typeof gtag !== 'undefined');
console.log('Meta Pixel:', typeof fbq !== 'undefined');
console.log('GTM:', typeof google_tag_manager !== 'undefined');

// Test event manually
gtag('event', 'test_event');
fbq('track', 'TestEvent');

Prevention Checklist

Before going live:

  • Test all tracking on published site (not preview)
  • Verify in GA4 Realtime / Meta Test Events
  • Check browser console for errors
  • Test on mobile devices
  • Test with ad blockers disabled
  • Test in incognito mode
  • Document all tracking codes installed
  • Set up monitoring alerts

When to Get Help

Contact Zyro support if:

  • Following all fixes but still not working
  • Platform-specific issues
  • Template issues affecting tracking
  • Need help with Zyro settings

Contact platform support if:

  • GA4/Meta/GTM configuration issues
  • Account access problems
  • Advanced tracking setup

Next Steps

For general tracking troubleshooting, see Tracking Issues Hub.