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!
Solved! Go to Solution.
... 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
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>
I've included two links as an example and would like to confirm that if we were to go with Sanford's #2 suggestion with marking up the <a> tag with the correct referrer policy will it actually work with our domain setup.
The referrerpolicy attribute works with any domains, so yes!
We wanted to know the domains to see if cookies would also work, and yes, they would: your domains share the common private domain idc.com so they can share cookies.
I’d personally go with referrerpolicy though, because it’s easiest to roll out.
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 https://pages.example.com do not have the same origin) the target site (i.e., your Marketo LP) will only see the Referrer “https://www.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.
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?
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)!
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
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>
I agree with Sandy’s suggestion. Since you don’t want to keep track of all the places where this page is linked to add UTMs everywhere, I think the latter option would be a better choice. Also, since you have a hop from your website to Marketo LPs, you would not be able to access the cookies across different domains even if you skillfully store the current page’s URL in a cookie so it can be accessed and potentially used to autofill a hidden field on the form on the Marketo LP.
Do we know it’s a different domain (using cookie semantics)? We know it’s a different origin but that’s different.
Hmm, true! @Liz_Nguyen1, could you please clarify whether different domains are involved or not?
Hello! Thank you all for your insights.
It would be from our main website domain (idc.com) to the Marketo LP (info.idc.com) as our use case. I've included two links as an example and would like to confirm that if we were to go with Sanford's #2 suggestion with marking up the <a> tag with the correct referrer policy will it actually work with our domain setup.
Website page: (there is a Contact Us button linking to Marketo LP)
Marketo LP:
Which is currently UTM tagged, which potentially opens up the conversation of adding in another parameter to capture webpage details to pass onto the form and add that value to a field, where we could add into an alert email.
However, if our setup could let us utilize option #2, we may go that route.
Appreciate the help on this and the recommendations!