GTM doesn't record event

Viewed 23

I have mysterious problem. Sometimes GTM records the event and sometimes it doesn't.

It's totally random. When I tested 3/3 it recorded and the next day 1/3, sometimes nothing etc ... I also compared the entire source code on the page to see if there is / isn't something else that might cause a problem in some cases. But in both cases, the source code is exactly the same. In both cases, the datalayer pretends that the event exist but GTM will not record it.

Do you have any idea what this can cause?

Left when it is fired. Right when it is not fired

1 Answers

I would suggest that perhaps if you're setting up the click event on DOM ready, perhaps the element isn't actually drawn to the page by that time (e.g. if it's an SPA app like Angular or Vue) consistently. So sometimes the event is configured and you see the event fire and sometimes it's not, so you don't.

Related