Re: Referrer URL and Lead Source - How To?

Anonymous
Not applicable

Referrer URL and Lead Source - How To?

Hi everyone!

I am setting up programs to place leads in specific campaigns based on where they came from. My first thought was Referrer URL -- I could attribute the lead to a channel. However, I'm noticing that my Referrer URLs are not matching my first-touch Referrer URLs.

For example, today a lead came in organically via Google. I know this because the referrer URL in his first touch (website visit) had a Referrer URL of google.com. But, on his form-fill activity, the Referrer URL reads marcom.com/request-demo (the page on which he filled out the form). I thought Referrer URL was supposed to populate with the page URL previous to the form fill?

My end goal is to say "if came from [Organic search], add to this campaign". The channels will vary...direct, paid, social, etc.

8 REPLIES 8
Mike_Reynolds2
Level 10

Re: Referrer URL and Lead Source - How To?

Sarah Mayer​ Referrer URL isn't widely used any more because it's entirely reliant on the website the lead is coming from to pass that data along during navigation, and most websites just don't bother any more. If the original website they're coming from doesn't pass along the Referrer URL data, there's nothing to pick up in that hidden form field, so you could get very inconsistent results.

A more consistent method would be to use URL parameters. That allows you to get full control over tracking your leads and how they get to your page. Check out the doc here: Tracking Lead Sources

SanfordWhiteman
Level 10 - Community Moderator

Re: Referrer URL and Lead Source - How To?

To forward first-touch information through form fillout, you save the information to cookies and set up hidden form fields so you can later pull from cookie values (all Marketo hidden fields can be set to AutoFill from cookies). This applies both to the remote referrer, which is only readable on the initial touch, and to any explicitly source-tagged URL parameters (utm_* or other values) which are also only available on the initial touch.

As Mike points out, it is better to not rely on getting full referrer information, instead making sure to source-tag all your links. 

[I wouldn't phrase it the way Mike does that modern websites don't "bother" sending the referrer. It's more that they closely manage what parts of the referrer are forwarded to you to protect privacy and/or intellectual property.  So they may strip out the parameters of the referring page (?this&search&is&private) but still send you the bare hostname (https://google.com). As long as your first touch landing page is running https:// you will still see the a ton of referrer info, and if it's the best you've got, it's worth using for attribution.  It will never be as complete as source tags, but you don't always have the chance to add tags, for example if someone organically shouts you out on their blog.]

Alok_Ramsisaria
Level 10

Re: Referrer URL and Lead Source - How To?

Sarah Mayer

We have implemented something similar for some of our customers. Here's what we have created to track Lead Source Most Recent, in cases where we do not pass any value in the URL parameters.

- A JS code which captures the referral URL when a user visits the website. If the user came from Google Search Engine, we would store the URL in a custom cookie with the JS code.

- If the user fills a form in the same session or comes back later, we would read the URL from the custom cookie and pass it to Marketo when the form is submitted.

- Basis the value, we have created a smart campaign that would match the referral URL with our list of attributes and assign a lead source. As an example, if the referral URL contains 'gclid=', we know the lead came from a paid Google Ad. Similarly, we have around 1500 values in our attribution list.

- Once we have updated the LSM value in Marketo, we would change the Referral URL = NULL. Also, we have a time set for expiring the cookie to ensure that we do not get the old referral url for subsequent visits from a user.

Anonymous
Not applicable

Re: Referrer URL and Lead Source - How To?

Alok,

i have a slightly different problem. I use the same form across dvertising channels for a particular asset (say ebook). but when it populated the lead source info i need to pick up the referring url for the search engine (e.g Google adwords or linkedin or Bing). does anyone have experience writing a code that would get it to automatically parse the referring url and populate the field?

thanks

SanfordWhiteman
Level 10 - Community Moderator

Re: Referrer URL and Lead Source - How To?

If you're talking about the referrer *of the page with the form* -- that is, the current referrer -- you don't need any code. Set hidden fields to Auto-Fill from so-called "Referrer params."

Anonymous
Not applicable

Re: Referrer URL and Lead Source - How To?

I am talking about the page that referred us to the LP (the form is on the LP)

Do we have to define ‘referrer -params’ or are they already pre-defined?

SanfordWhiteman
Level 10 - Community Moderator

Re: Referrer URL and Lead Source - How To?

Nothing is predefined: you add a Hidden field to draw data from a Referrer Param.

Anonymous
Not applicable

Re: Referrer URL and Lead Source - How To?

Thanks much. Appreciate your response and super quick turnaround