Full Referrer URL from Website Page to Marketo LP Form Submit | Community
Skip to main content
New Participant
July 18, 2023
Solved

Full Referrer URL from Website Page to Marketo LP Form Submit

  • July 18, 2023
  • 1 reply
  • 3958 views

Hello, 

I am looking at a way to capture the full referrer URL from the website page a person was on before they landed on our Marketo landing page and submitted the form. Most of the use cases I've been reading on the community have been for form embed on the website page, but that isn't our use case. We have a few product pages on our website that link to a Marketo LP, where we want to capture which product page they were on before submitting the form on a Marketo LP. Would like to include that full URL in an alert email to sales to help better understand which product pages they came from.

 

I am looking to understand if this is something we can do on the Marketo side or if it would be on the website side.

Looking to get a step-by-step on what would be necessary to achieve this behavior. Hidden fields? Updates to the LP templates? JS?

 

Thanks! 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Hi Sandford,

I agree, it probably isn't updated on our end and left as default. Been reading some of your suggestions on the community, but most use cases are getting the webpage URL from Marketo form embed. As our use case is website page to Marketo LP and form submit, any other recommendations on how we could achieve the desired outcome of being able to capture the website product page they were on before they clicked link to our Marketo LP and submitted a form?

 

Thank you!



... any other recommendations on how we could achieve the desired outcome of being able to capture the website product page they were on before they clicked link to our Marketo LP and submitted a form?

Well, you either have to

  1. add UTMs to the links or
  2. mark up the <a> tag with the correct referrer policy

Since you have to touch the link either way, the latter is easier.

<a href="https://pages.example.com" referrerpolicy="unsafe-url">Contact Us</a>

 

1 reply

Darshil_Shah1
Community Manager
July 18, 2023

Well, the first thing that you need to know about capturing the referer URL is that not all websites send them, and by default, the current default for Chrome is "strict-origin-when-cross-origin" which means unless the source site is specifically configured to reveal more of its own visitor data, and the sites are on different origins (note: https://www.example.com and pages.example.com do not have the same origin) the target site (i.e., your Marketo LP) will only see the Referrer “example.com”. So your first step is to ensure that you have the default policy overridden to allow referrer URL sharing to support your use-case. Also, it could be just me and the projects I've worked on so far, but I don't see a lot of merit in capturing referral URLs, given that all the other things, like Marketo tracking, UTMs, etc. are in place for keeping a track of the incoming traffic.

 

LizNg2Author
New Participant
July 18, 2023

Thank you for your insight. I believe our team does not want to use UTM links as they do not want to maintain and keep track a list of links where this LP may link from, which is where the question came from on how we could capture which of our website page they were on before they arrived to our Marketo LP and what we need to do in order to set that up.  So now I am tasked with trying to find a way we could pass the URL to our sales group on the page they came from.

 

In your suggestion on having the default policy overridden to allow referrer URL shared, where would that need to happen? Website side? Do you have any other suggestions on how we could achieve the behavior we want on capturing the website page they came from before the Marketo LP and form submit?

SanfordWhiteman
New Participant
July 18, 2023

Provide an actual URL on the source site (your website) and we can tell you whether the referrer is forwarded. As Darshil says, it likely isn’t because that’s the secure browser default.

 

If it needs to be changed, it would be changed by your web team. You can’t, by definition, override security measures on the target site (the Marketo LP domain)!