- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
05-23-2023 11:31 AM
We noticed that our GA4 tags seem to be delayed in firing due to a setTimeout function that is set to 5000 ms. Is the setTimeout function part of the standard GA4 tag template and if so what is the typical default? We have made some changes to get our events firing correctly in our GA4 tag but none that include setTimeout. The setTimeout comes from the GTM script(https://www.googletagmanager.com/gtag/js?id=G-TM0P7DF8JE) that is loaded through our Tealium tag, which we do not have any control over. Any thought on how to fix this?
05-23-2023 11:53 AM
Hello @anourani111 This used to be a timeout put in place within the GA4 library on Google's side - I believe its their way and waiting to see if there are multiple events that they can batch and send together.
This is supported by their documentation here
I believe there used to be a way to have this send immediately involving some debug flag, but you probably dont want to enable this in production.
05-23-2023 12:02 PM
Thank you @LordLingham
What is the best way to deal with this then?
05-23-2023 12:05 PM
@anourani111
In production, Im not sure there is anything you can reasonably do to bypass this.
This is part of the "design" with the client-side batching which is generally "best" for the user. If they navigate away the events should still fire.
For development / testing, you may be able to use the dev chrome extension which used to bypass the wait.
https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna
Copyright All Rights Reserved © 2008-2023