Common reasons button-click tracking doesn’t fire
- GTM container not published - You imported the container but didn’t click Submit → Publish.
- GTM snippet not installed on your site - The GTM code needs to be in your site’s <head> and <body>.
- Button uses JavaScript navigation instead of href - If the button navigates via
window.locationor a framework router, a standard Click URL trigger won’t match because there’s no real anchor link. - CSS text-transform changes the visible text - Your trigger matches “Get Started” but the DOM text is “get started” because CSS
text-transform: uppercaseis applied visually only. - Button is inside an iframe - GTM cannot see clicks inside iframes from a different origin. You need GTM installed inside the iframe’s document as well.
- Dynamic buttons loaded after page load - If the button is injected by JavaScript after the DOM is ready, a trigger that fires on DOM Ready may not attach correctly. Use a Click – All Elements trigger instead.
- Elementor buttons use
data-idinstead of standard classes - Elementor generates uniquedata-idattributes; targeting a CSS class like.elementor-buttonmay match every button on the page. - Divi buttons use
et_pb_prefixes - Divi wraps buttons in containers with classes likeet_pb_button. Your Click Element selector needs to account for this structure.
Step-by-step debugging checklist
- Verify GTM is installed - Visit your site, right-click → View Page Source, search for “GTM-”. If you don’t see it, GTM isn’t installed.
- Check GTM Preview mode - In GTM, click Preview. Navigate your site and trigger the event. Look for your tag in the Tags Fired section.
- Check the trigger - If the tag shows as “Not Fired”, click on it to see which trigger conditions aren’t met.
- Inspect the button element - Right-click the button → Inspect. Note the tag name (
button,a,div), classes, and anydata-*attributes. Make sure your trigger selector matches. - Test with a Click – All Elements trigger - Create a trigger with no filters and check GTM Preview to see what Click variables populate when you click the button.
WordPress-specific issues
WordPress sites often use page builders like Elementor and Divi that generate non-standard HTML for buttons. Elementor buttons are wrapped in .elementor-button-wrapper containers and use data-id attributes for identification. Divi buttons sit inside .et_pb_button_module_wrapper elements with classes prefixed by et_pb_.
If you’re targeting a specific button, use GTM Preview to click it and check the Click ID, Click Classes, and Click Element values. These are often different from what the page builder’s visual editor shows.
Caching plugins (WP Rocket, W3 Total Cache) can also delay GTM container loading. If your tag intermittently doesn’t fire, check whether the page is being served from cache before GTM initialises.
How to verify it’s working
- Open GTM Preview/Debug mode
- Navigate to your site
- Trigger the event (click the button)
- Check the GTM debug panel - your tag should appear under “Tags Fired”
- Check GA4 DebugView (GA4 → Admin → DebugView) to confirm the event arrived
Still didn’t work?
Our team can help. Describe what’s happening and we’ll get back to you within 24 hours.