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.
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.
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.