Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Google Tag Manager Fires Tags in Preview (Debug) Mode, but Not on the Live Site

I have added a custom HTML class to the div and innermost span (the text) of a button.

When this button is clicked in the preview (debug) mode, the event fires, and the real-time Google Analytics stats update accordingly.

When I click the same button outside of preview mode, it does not reflect on Google Analytics.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I have tried multiple browsers (Chrome, Chrome Incognito, Opera, Edge) (without any browser extensions) and a different computer and network, but none trigger the tag.

The class is on the live site outside of the preview mode.

Any help will be greatly appreciated – thanks in advance!

>Solution :

You’re supposed to publish your workspace for it to work without preview.

Also, it’s not good to use Click Classes. It’s better to use Click Element -> Matches CSS Selector -> .calendy-consult-edwards, .calendy-consult-edwards *

Also, having pure JS in onclicks is not a good practice. Mixing languages leads to confusion.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading