Skip to content
FunnelGuard

Fix guide by FunnelsGuard

dataLayer event name mismatch with GTM trigger: how to fix it

TRK-131High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

The dataLayer is a list of messages your website hands to Google Tag Manager (GTM). A typical message looks like dataLayer.push({event: 'form_submit'}). In GTM, a Custom Event trigger waits for a message with a specific event name and then fires your tags.

A mismatch happens when the name in the code and the name in the trigger are not the same. For example, the site pushes formSubmit but the trigger listens for form_submit. GTM does not show an error. The tag just never runs.

Event name matching is case sensitive by default. Lead, lead and lead (with a trailing space) are three different names. The trigger also has a regex option, and a stray character there can break matching too.

Why it costs you leads or sales

The visitor still submits the form or buys. But the conversion tag tied to that event never fires, so GA4, Google Ads, Meta and others see nothing. Reports show fewer conversions than really happened.

That hurts in practice. Smart bidding learns from the conversions it sees, so it can bid less on campaigns that are working. You may pause good ads, or credit the wrong channels. Because nothing visibly breaks on the page, the gap can go unnoticed for weeks.

Where the signal is lost
  1. Visitor submits formLead is real and arrives
  2. Site pushes eventdataLayer.push({event: 'formSubmit'})
  3. GTM trigger checks nameListens for 'form_submit'
  4. Conversion tagsGA4, Google Ads, Meta never fire
  5. Reports and biddingConversion missing

The visitor converts, but the event name does not match the trigger, so every tag after it is lost.

An event that no trigger is listening for

The event reaches GTM, but no trigger matches its name, so the tag stays idle.

How to check if your site has it

Compare the pushed name with the trigger name
  1. Open GTM PreviewGoogle Tag Manager

    In Tag Manager click Preview, enter your site URL and complete the action (submit the form, add to cart, and so on).

  2. Find the event in the left list

    In Tag Assistant, look for your event in the summary on the left. If the name appears there, the site did push it. Note the exact spelling.

  3. Check the Tags Fired section

    Click the event. If your tag is under Tags Not Fired, open it and look at its trigger. Compare the trigger's Event name with the name you just saw, character by character.

  4. Inspect the dataLayer directly

    In the Data Layer tab of Tag Assistant, or by typing dataLayer in the browser console, check the event key for case, spaces, hyphens and underscores.

  5. Check for no event at all

    If the event never appears in the list, the problem is the push itself (code not running, or the push sits after a redirect), not the name.

Quick console check of recent dataLayer eventsjavascript
dataLayer.filter(function (m) { return m.event; }).map(function (m) { return JSON.stringify(m.event); });
Common mismatches that look almost right
Pushed by siteTrigger expectsWhy it fails
formSubmitform_submitCamel case vs underscore
LeadleadDifferent capital letter
purchase purchaseTrailing space
generate-leadgenerate_leadHyphen vs underscore
gtm.formSubmitformSubmitBuilt-in GTM event confused with a custom one

How to fix it

Decide which side is the source of truth. Usually it is the code, because developers, themes or plugins may use that name elsewhere. Then change the other side to match. Either way, the two names must be identical.

Fix the name by platform
  1. Edit the trigger

    Go to Triggers, open the Custom Event trigger and paste the exact event name from Preview into Event name. Leave Use regex matching off unless you need it.

  2. Check linked tags

    One trigger may serve several tags. Open the trigger's list of tags to see what the change affects.

  3. Publish

    Click Submit and Publish. A change left in the workspace does not affect the live site.

Push whose name matches a trigger called generate_leadjavascript
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'generate_lead',
  form_id: 'contact'
});
Trigger and push out of sync vs in sync

Mismatch

  • Site pushes formSubmit
  • Trigger listens for form_submit
  • Tag shows under Tags Not Fired
  • No conversions recorded

Matched

  • Site pushes form_submit
  • Trigger listens for form_submit
  • Tag shows under Tags Fired
  • Conversions reach GA4 and ad platforms

How to confirm it's fixed

Confirmation checks
  • In GTM Preview, repeat the action and see your tag under Tags Fired for that event
  • The event name in the Data Layer tab matches the trigger exactly
  • The tag fires once per action, not twice
  • In GA4 DebugView or the platform's test tool, the hit arrives with the right parameters
  • The container is published and the live site runs the new version
  • A real test conversion later appears in reports

How to prevent it happening again

Mismatches usually appear after a redesign, a plugin update or when a developer renames an event without telling whoever manages GTM. A few habits cut the risk.

Prevention habits
  • Keep a short list of event names (a tracking plan) shared by developers and marketers
  • Use one naming style, such as lowercase with underscores
  • Name GTM triggers after the event, for example CE - generate_lead
  • Run GTM Preview after every site release that touches forms, checkout or scripts
  • Check that the container version changed only when you meant it to
  • Test the full journey on a schedule rather than waiting for reports to dip
How a mismatch usually goes unnoticed
  1. Day 1

    A developer renames the event in the theme from form_submit to formSubmit.

  2. Day 1

    Forms still work and the thank-you page loads, so nothing looks wrong.

  3. Day 3

    Reported conversions start to fall, but it looks like normal variation.

  4. Week 3

    Someone compares leads in the CRM with ad platform conversions and spots the gap.

  5. Week 3

    The trigger name is corrected and published. Example timeline only.

Conversions seen vs real leadsExample numbers
Conversions seen vs real leads (example)Real leads (CRM): 40 leads per week; Reported, mismatch: 6 leads per week; Reported, fixed: 40 leads per week0153140640Real leads (CRM)Reported, mismatchReported, fixedleads per week

Example: 40 real leads a week, but only the ones tracked by another route are reported while the trigger is mismatched.

How FunnelGuard handles this

FunnelGuard detects this issue. A robot visitor runs your real journey on a schedule, such as a lead form or checkout, and checks the dataLayer for the expected event (the dataLayer_event check). It also checks that the tracking hits to GA4, Google Ads, Meta and other platforms are actually sent. If the event is missing or the hit does not arrive, FunnelGuard re-checks from a second region and then sends one alert with a screenshot and a likely cause.

Test traffic is marked (utm_source=funnelguard, fg_test=1) so you can filter it from reports. The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans have a 3-day free trial.

Questions people ask

Why is my GTM trigger not firing even though the event shows in the dataLayer?

Most often the Custom Event trigger's Event name differs from the pushed event value. Matching is case sensitive, so a different capital letter, hyphen or trailing space is enough to stop it. Compare both names character by character in GTM Preview.

Is the GTM Custom Event name case sensitive?

Yes. By default Lead and lead are different events. Only the regex option lets you ignore case, using a pattern with the case-insensitive flag, but an exact matching name is safer.

How do I find the exact event name my site pushes?

Open GTM Preview, perform the action and click the event in the Tag Assistant list. Or type dataLayer in the browser console and read the event key. Copy the name exactly rather than retyping it.

Why does GTM Preview show my tag under Tags Not Fired?

The trigger conditions were not met. For a Custom Event trigger this is usually a name mismatch, but extra conditions such as a Page URL filter can also block it. Open the tag, then the trigger, and check each condition against the event details.

Should I change the dataLayer push or the GTM trigger to fix a mismatch?

Change whichever side is easier to keep stable. If other tools or developers rely on the pushed name, edit the GTM trigger. If the trigger is shared across many tags and the code is yours, edit the push. The key is that both end up identical.

Can I use regex in a GTM Custom Event trigger?

Yes, tick Use regex matching and enter a pattern such as ^(form_submit|generate_lead)$. Use it carefully, as loose patterns can fire on unrelated events and cause double counting.

How can I be alerted if a dataLayer event stops matching?

Run a scheduled test of the journey that checks the event and the tracking hits. FunnelGuard does this with a robot visitor and alerts you if the expected dataLayer event or hit is missing.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: dataLayer_event.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.