r/GoogleTagManager • • Oct 23 '26

Question gTM

I want to track the exact page from where the form is filled. There is one calendly form and a hubspot form on CTA . I have setup a thankyou page view event but now my manager wants to know from which page the form was filled. Now how to do this

1 Upvotes

12 comments sorted by

•

u/AutoModerator Oct 23 '26

If this post doesn't follow the rules report it to the mods. Have more questions? Join our community Discord!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/Quirky-Bad1452 22d ago

In this case run a custom html where it says record all the page path url or the embedded url referral and thencreate custom js variable and add this variable as parameter for thank you page, page view event and then check before submitting

1

u/Top_Society_6201 22d ago

If possible please share the code

1

u/Pretty-Appearance226 Oct 23 '26

There’s a page referrer parameter that tells you the previous page. So, if the thank you page is a separate page, then this easy solution wil suffice. You might have to add it as a custom dimension in GA4.

1

u/Top_Society_6201 Oct 23 '26

If possible can u please explain this

→ More replies (1)

1

u/History86 Oct 23 '26

Set a chtml listener on the POST and listen to which form was submitted

1

u/Top_Society_6201 Oct 23 '26

What does that means

1

u/History86 Oct 24 '26

Can you send the url? In a DM? I’ll send you a script that will help

1

u/beash88 Oct 25 '26

Where do you want to track this? In Google Analytics? Or in your CRM? Or somewhere else?

You can capture this information in HubSpot (and in Calendly) using tools like Attributer and then you can see which page each individual lead filled out the form on.

Otherwise yeah, you can do it in GA4 as others have suggested, but you will just get totals. You won’t be able to see ‘this lead came from google search and filled out the form on this page’