How to Track Landing Pages in Hubspot SignUps

prakashrawatt
Participant

I want to track the pages where the user landed before submitting the HubSpot form. 

0 Upvotes
1 Accepted solution
HRoss47
Solution
Participant

The easiest way is to capture the landing page URL in a hidden form field. In your HubSpot form editor, add a hidden field like Original landing page (or any custom property you want) and set its default value using Javascript:
document.querySelector('input[name="original_landing_page"]').value = window.location.href;

 

That way, when the form is submitted, HubSpot saves the exact page where the visitor filled it out. You’ll then see that data in the contact record and can build reports or lists by landing page.

If you’re working with multiple domains or UTM parameters, you can expand the script to store the first page the visitor saw or the UTM source instead of just the current one.

View solution in original post

2 Replies 2
Shubham_Sharma
Guide

Hey @prakashrawatt 

 

Visitors will be tracked anonymously even before they become contacts. If and when a visitor fills out a form, HubSpot will associate their previous page views based on the tracking cookie. If the email address filled in the form is associated with an existing contact, this visitor will be identified as the contact. This includes contacts that were imported. 

 

For more information on this, kindly check this article here: https://knowledge.hubspot.com/account/how-does-hubspot-track-visitors 

0 Upvotes
HRoss47
Solution
Participant

The easiest way is to capture the landing page URL in a hidden form field. In your HubSpot form editor, add a hidden field like Original landing page (or any custom property you want) and set its default value using Javascript:
document.querySelector('input[name="original_landing_page"]').value = window.location.href;

 

That way, when the form is submitted, HubSpot saves the exact page where the visitor filled it out. You’ll then see that data in the contact record and can build reports or lists by landing page.

If you’re working with multiple domains or UTM parameters, you can expand the script to store the first page the visitor saw or the UTM source instead of just the current one.