Skip to content

Google Analytics 4 Custom Tags Not Firing #8435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bicarlsen opened this issue Aug 22, 2021 · 5 comments
Closed

Google Analytics 4 Custom Tags Not Firing #8435

bicarlsen opened this issue Aug 22, 2021 · 5 comments

Comments

@bicarlsen
Copy link

Details

Expected Result

Custom tags created using Google Tag Manager in conjunction with Google Analytcis 4 should be fired.

Actual Result

While the built-in tags are fired, the cutom tags are not. I have the same tag running on another site (both are outbound link clicks to the same URL) that is working perfect, however it is not working on my RTD site. To test I created another custom tag that fires on every page view, and that is not being fired either.

@bicarlsen
Copy link
Author

Here is a relevant discussion about the GA4 patch: #7662.

@davidfischer
Copy link
Contributor

Read the Docs doesn't load Google Tag Manager. I didn't see it loaded on your site (https://thot-data-docs.readthedocs.io/en/latest/) but it could be loaded via some non-obvious mechanism and I'm missing it. We only load analytics and only if you specify your analytics ID which you did. This might be why you're seeing analytics pageviews but not custom events. If that isn't it, let me know how you're loading tag manager and read on!

Secondly, we load two analytics IDs (yours and ours) and it's possible that your events are firing on the wrong ID. Our code for this is pretty simple that does this so take a quick look.

Questions / Suggestions

  • How are you loading tag manager? If you aren't yet loading it, there's a couple ways to do it but one way would be to add custom JS for it.
  • When you fire these events through tag manager, do you also specify the analytics ID it should fire for? It's been a few years since I used tag manager and I'm not as familiar with it anymore.
  • This probably isn't it, but we do disable analytics if you enable the Do Not Track setting in your browser. This can also be set automatically by some browsers in incognito mode or when using some browser extensions like Privacy Badger.

@bicarlsen
Copy link
Author

Ah, okay. Is there a reason to not load Google Tag Manager?

@davidfischer
Copy link
Contributor

There isn't a particular reason but if you need GTM on your docs, you can make that decision and load it. You can either load it with a custom template or with custom JS as I pointed out earlier. That should take care of it but let me know if you have any issues.

@stsewd stsewd added the Needed: more information A reply from issue author is required label Aug 24, 2021
@bicarlsen
Copy link
Author

Wonderful. Thanks for the info.

@no-response no-response bot removed the Needed: more information A reply from issue author is required label Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants