Skip to main content
added 335 characters in body
Source Link
BNazaruk
  • 1.9k
  • 7
  • 10

Make sure the environment and container of the GTM that's on the site is the same that you're previewing. Also make sure the workspace you're previewing is the correct workspace.

Why do you have the Container Loaded event after the task_event? If it's the same container reloading... Check the dataLayer too, see if anything clears it. Still, the event should work syncly or close enough to that from the preview perspective, so even if you have some odd reloads after the event, that shouldn't justify the issues with the event.

Gtag could probably interfere with GTM in this way? So if you're manually loading gtag.js and using it's api, you should stop. Move all that logic into GTM.

Preview, however, may be bugged. As Simo indicated, if the preview returns the current event value rather than the one that fired on the actual event, then reloading the DL or GTM would cause something like that. Check if that tag actually fires. Deploy some console log as CHTML and check if it's in the dom, or check the console.

Anyhow, check all these things, try fixing the mess with container reloading. If nothing helps, then maybe share the preview link? I'd like to see it myself. Maybe you're looking in wrong places.

Make sure the environment and container of the GTM that's on the site is the same that you're previewing. Also make sure the workspace you're previewing is the correct workspace.

Why do you have the Container Loaded event after the task_event? If it's the same container reloading... Check the dataLayer too, see if anything clears it. Still, the event should work syncly or close enough to that from the preview perspective, so even if you have some odd reloads after the event, that shouldn't justify the issues with the event.

Gtag could probably interfere with GTM in this way? So if you're manually loading gtag.js and using it's api, you should stop. Move all that logic into GTM.

Anyhow, check all these things, try fixing the mess with container reloading. If nothing helps, then maybe share the preview link? I'd like to see it myself. Maybe you're looking in wrong places.

Make sure the environment and container of the GTM that's on the site is the same that you're previewing. Also make sure the workspace you're previewing is the correct workspace.

Why do you have the Container Loaded event after the task_event? If it's the same container reloading... Check the dataLayer too, see if anything clears it. Still, the event should work syncly or close enough to that from the preview perspective, so even if you have some odd reloads after the event, that shouldn't justify the issues with the event.

Gtag could probably interfere with GTM in this way? So if you're manually loading gtag.js and using it's api, you should stop. Move all that logic into GTM.

Preview, however, may be bugged. As Simo indicated, if the preview returns the current event value rather than the one that fired on the actual event, then reloading the DL or GTM would cause something like that. Check if that tag actually fires. Deploy some console log as CHTML and check if it's in the dom, or check the console.

Anyhow, check all these things, try fixing the mess with container reloading. If nothing helps, then maybe share the preview link? I'd like to see it myself. Maybe you're looking in wrong places.

Source Link
BNazaruk
  • 1.9k
  • 7
  • 10

Make sure the environment and container of the GTM that's on the site is the same that you're previewing. Also make sure the workspace you're previewing is the correct workspace.

Why do you have the Container Loaded event after the task_event? If it's the same container reloading... Check the dataLayer too, see if anything clears it. Still, the event should work syncly or close enough to that from the preview perspective, so even if you have some odd reloads after the event, that shouldn't justify the issues with the event.

Gtag could probably interfere with GTM in this way? So if you're manually loading gtag.js and using it's api, you should stop. Move all that logic into GTM.

Anyhow, check all these things, try fixing the mess with container reloading. If nothing helps, then maybe share the preview link? I'd like to see it myself. Maybe you're looking in wrong places.