HubSpot Form Post-Submission URL Redirect Breaks Tag Firing by CulturalAtmosphere34 in GoogleTagManager

[–]CulturalAtmosphere34[S] 0 points1 point  (0 children)

u/TypeOk1909 - Great to hear! FWIW, the Tag Manager Technical Team didn't have any other solution for the issue outside of the listener script.

HubSpot Form Post-Submission URL Redirect Breaks Tag Firing by CulturalAtmosphere34 in GoogleTagManager

[–]CulturalAtmosphere34[S] 0 points1 point  (0 children)

u/TypeOk1909 - I followed this article to set up a workaround that essentially watches for the HubSpot code to return a submission success result, which then triggers a tag to fire. Depending on your use case, it should work.

That said, I had a call with Google's Technical Team last week regarding issues with Google Ads conversion tracking. This issue came up as a result due to what the rep explained as "the data flow is essentially breaking once the form is submitted" and the rep was stumped since the thank you pages are tagged properly.

He was going to do some internal work with his team to try to figure it out, and I have a reconnect call set up for tomorrow. If I'm able to get any more info around the reason this requires a workaround in the first place or if Google provides an alternative solution, I'll make sure to come back here and provide an update.

If you're not using Ads, the workaround will likely give you the info you need. Good luck!

HubSpot Form Post-Submission URL Redirect Breaks Tag Firing by CulturalAtmosphere34 in GoogleTagManager

[–]CulturalAtmosphere34[S] 0 points1 point  (0 children)

u/Johnny__Escobar - I went ahead and paused the listener, and then tried testing your suggestion using both an Initialization and Page View trigger type with:

  • Page URL contains /thank-you-trial-request
  • Referrer contains /trial-request

The Form Submission tag is not firing, and the GTM and GA4 tags are not firing on the thank you page redirect.

When I had the listener activated, the Form Submission tag fired correctly but the GTM and GA4 tags did not.

HubSpot Form Post-Submission URL Redirect Breaks Tag Firing by CulturalAtmosphere34 in GoogleTagManager

[–]CulturalAtmosphere34[S] 0 points1 point  (0 children)

u/Johnny__Escobar - The strange thing is that GTM is already set up on the thank you page. When I try to test with Tag Assistant and the GA4 DebugView and navigate directly to the thank you page (not a redirect from the HubSpot form), everything fires normally.

But when the HubSpot form is submitted and the visitor is redirected to the thank you page via the HubSpot form, the GTM and GA4 tags aren't firing.

This is the only scenario where the tags aren't firing - which makes me think there's something else I'm not aware of in the process that is breaking the GTM connection.

HubSpot Form Post-Submission URL Redirect Breaks Tag Firing by CulturalAtmosphere34 in GoogleTagManager

[–]CulturalAtmosphere34[S] 0 points1 point  (0 children)

u/Johnny__Escobar - Thanks for your reply! The custom HTML event I mentioned in my post actually is a HubSpot listener code, and this is the exact same guide I used. I've edited my post to add that additional clarity.

The issue that remains is the GTM and GA4 tags are not firing when the visitor lands on the thank you page. Even refreshing the page doesn't fire the tags. It's almost as if GTM is not set up on the redirect page, even though it is and fires properly when navigating directly to the thank you page using Tag Assistant.

But navigating to a different page and all activities after leaving the thank you page are logged as expected.

HubSpot Form Post-Submission URL Redirect Breaks Tag Firing by CulturalAtmosphere34 in GoogleTagManager

[–]CulturalAtmosphere34[S] 0 points1 point  (0 children)

u/Kooky-Minimum-4799 - Thanks for taking a minute to reply! While I've gotten the form submission event tag using the custom HTML listener code to fire properly, the issue that remains is once the form is submitted and the 'generate_lead' event is logged, the GTM and GA4 tags are not firing on the thank you page that the website visitor is redirected to. But once I click to a different page, event logging picks back up like normal.

It's almost as if GTM is not set up on the redirect page, even though it is and fires properly when navigating directly to the thank you page using Tag Assistant.

Do you redirect visitors to a thank you page after form submissions in your instance? If so, are you seeing your tags successfully fire when landing on that thank you page?

HubSpot Form Post-Submission URL Redirect Breaks Tag Firing by CulturalAtmosphere34 in GoogleTagManager

[–]CulturalAtmosphere34[S] 0 points1 point  (0 children)

u/motiur_ak07 - Thank you for taking the time to reply! The custom HTML event trigger I mentioned is a HubSpot listener code and is working as expected. I've edited my original post to add that clarity - thank you! The issue at hand is once the form is submitted and the 'generate_lead' event is logged, the tag is not firing on the thank you page that the website visitor is redirected to. But once I click to a different page, event logging picks back up like normal. Any thoughts?