Custom events from Google Tag Manager

Hi,

I have created a custom event in Hubspot and a trigger in Google Tag Manager and mapped them so I will see in hubspot only the people which started a draft.

What I see now is that the custom event tag is fired also on other pages and on all our subdomains.

We do have a single page application.

Can you please help me resolve this? Is it something to do in Hubspot or in Google Tag Manager?

Thank you!

Hey @DGanot2, Happy Monday!

Thank you for reaching out. I understand your concern regarding the custom event firing on pages and subdomains where it shouldn’t. Given that you have a single-page application (SPA), this behavior might be due to the way your tags and triggers are set up in Google Tag Manager (GTM).

Please, double-check the trigger conditions you’ve set for the custom event tag in Google Tag Manager. Ensure that they are specific enough to fire only when the event occurs on the intended pages or subdomains. You might need to refine these conditions based on your SPA structure.

Since you mentioned subdomains, ensure that your cross-domain tracking setup is correct in Google Tag Manager. This is especially important for SPAs that span across multiple domains or subdomains. Make sure that your tags are configured to work seamlessly in this environment.

More information here.

Kindly,

Pam

We had the same problem. When you create the custom event i HubSpot, you have to delete the code snippet (on step 3). When this is deleted, this should only trigger based on GTM.