SOLVED

Need to Track the reference URL ?

Go to solution
Ravi_Ansal2
Level 6

Need to Track the reference URL ?

Hi Everyone,

I want to track the URL(domain+Reference) from which a lead landed on our page?

I have tried document.referrer script but it is not working properly?

Sometimes it shows the empty URL and sometime it does not provide the whole URL?

Please Help me with this

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Need to Track the reference URL ?

Yes, https: -> https: will be captured, AFAIK (let us say, there is no standard prohibition against it as there is with https: -> http:)

Note, however, that this is the true referrer we're talking about.  Google bounces you off their base domain first so the referrer doesn't have the query string -- but that is nonetheless the real referring site. Yahoo will show the full thing.1

ETA: 1 Meaning a network trace of Yahoo traffic shows Y doesn't "massage" the referrer via an interstitial page before JS-redirecting to your site.  Instead they use an HTTP redirect (Google will do the same thing if you have JavaScript disabled, I think).  All standard rules (and possibly non-standard browser implementations) apply from there.

To return to Ravi Ansal​'s question, the bottom line is there are conditions that Marketo can't workaround where the capital-R Referrer (as in the document.referrer property) isn't available or is truncated so that it isn't as actionable as you want.  Unless you can establish that the full document.referrer is available to JavaScript and yet isn't associated with the web action, I don't think you've found a bug.

ETA: Hope it's cool that I'm editing my Correct Answer, but actually the above remark about Yahoo not using an interstitial is wrong, per research I posted later.  Both Google and Yahoo (as of this writing) use interstitial ping pages which change their ostensibly secure search to only partially secure.  Other search engines like Bing maintain better security from end to end.  Please read my later comments here for the bigger picture.

View solution in original post

13 REPLIES 13
Anonymous
Not applicable

Re: Need to Track the reference URL ?

Hi Ravi Ansal

Thanks for posting a question! However, this is the champion group where we hope you'll come to learn about the Champion program and ask questions about it if you have them. Your question is more appropriate for our Products and Support​ area, where all Marketo 'how to' questions should go. Please move your post so it can be answered faster by clicking "move" on the right side of this discussion.


Thanks!

Joe_Reitz
Level 10 - Champion Alumni

Re: Need to Track the reference URL ?

Hi Ravi,

We track how a lead found their way to our content by using different links, like www.domain.com/content?ref=QueryString

So the link we send through email: www.domain.com/content?ref=email

vs. LinkedIn: www.domain.com/content?ref=LinkedIn

vs. our website: www.domain.com/content?ref=website

Then these leads are automatically added to a smartlist within the program. Is this what you mean?

We Marketo___2014_VAWA_White_Paper_source___LinkedIn_•_Marketing_Activities.png

If it doesn't look cool, you're probably doing it wrong.
SanfordWhiteman
Level 10 - Community Moderator

Re: Need to Track the reference URL ?

I assumed Ravi was talking about the referring page, which can be different even if the destination URL on your site is the same (although, as you illustrate, in many cases you can embed the friendly name of the source directly into the destination URL when placing an advertising link).

Ravi Ansal​ Marketo (both Munchkin and Forms) will always try to store the referrer if it's present.  However, there are some cases where it cannot be provided.  One major example is if the referring site is using https:// but your LP is using plain http://.  In this case browsers are protecting your privacy by suppressing the information, thus it will be blank.  There is nothing you can do, even with JavaScript, to retrieve it.

Elliott_Lowe1
Level 9 - Champion Alumni

Re: Need to Track the reference URL ?

Sanford, are you saying that when someone is referred to a munchkin tracked web page that uses HTTPS from a Google search where they are logged in to Google (URL's scheme is https://), that the Referrer URL will be captured?

SanfordWhiteman
Level 10 - Community Moderator

Re: Need to Track the reference URL ?

Yes, https: -> https: will be captured, AFAIK (let us say, there is no standard prohibition against it as there is with https: -> http:)

Note, however, that this is the true referrer we're talking about.  Google bounces you off their base domain first so the referrer doesn't have the query string -- but that is nonetheless the real referring site. Yahoo will show the full thing.1

ETA: 1 Meaning a network trace of Yahoo traffic shows Y doesn't "massage" the referrer via an interstitial page before JS-redirecting to your site.  Instead they use an HTTP redirect (Google will do the same thing if you have JavaScript disabled, I think).  All standard rules (and possibly non-standard browser implementations) apply from there.

To return to Ravi Ansal​'s question, the bottom line is there are conditions that Marketo can't workaround where the capital-R Referrer (as in the document.referrer property) isn't available or is truncated so that it isn't as actionable as you want.  Unless you can establish that the full document.referrer is available to JavaScript and yet isn't associated with the web action, I don't think you've found a bug.

ETA: Hope it's cool that I'm editing my Correct Answer, but actually the above remark about Yahoo not using an interstitial is wrong, per research I posted later.  Both Google and Yahoo (as of this writing) use interstitial ping pages which change their ostensibly secure search to only partially secure.  Other search engines like Bing maintain better security from end to end.  Please read my later comments here for the bigger picture.

Elliott_Lowe1
Level 9 - Champion Alumni

Re: Need to Track the reference URL ?

It seems as though the Referrer URL is tracked even when referred from HTTPS to HTTP.  While logged in to Google, I clicked an organic link to http://www.integrativenutrition.com and my Marketo lead record shows the Referrer URL as http://www.google.com/ 

SanfordWhiteman
Level 10 - Community Moderator

Re: Need to Track the reference URL ?

If the referer URL is http://www.google.com then you weren't using secure search -- simple as that.  Note Google does not always redirect you to their secure site.  The http:// search site still exists, for example this is a direct link to insecure search.

ETA: To go back and correct myself here, Elliott Lowe was indeed using "secure search" in his test -- as in going to https://www.google.com to begin with -- but both Google and Yahoo (see my long-winded post below after I did some up-to-date tests) bounce users off a plain http:// link before going to the final destination. So, in a sense, with those search engines there is no such thing as end-to-end security.  You really have a mixed-content environment considering the extra hops; it's not as simple as one company's https://www.example.com having an <A> to another company's http://www.example2.com.

With https://www.bing.com, on the other hand, you never hit an http:// site along the way, so Bing (and, I found later, Startpage Search Engine and the venerable Dogpile Web Search) would conform more strictly to the notion of "secure search." 

So what is the practical difference?  OK, imagine you have a hacker listening on all your network traffic (as we are supposed to assume is happening whenever we're at a hotel or coffee bar).

  • If you use "secure Bing" and go to another https:// site, then the hacker will only know you went to bing.com and example.com.  They won't see the URL paths or cookies or any other information you sent to these sites.
  • If you use "secure Yahoo" and go to another https:// site, the hacker can see [a] the full path you are going to on the https:// site and [b] any cookies that are sent to http://r.search.yahoo.com

That's actually a pretty big difference when you ruminate on it.

Ravi_Ansal2
Level 6

Re: Need to Track the reference URL ?

Hi Sanford,

Thanks for the great explanation.
I am getting your point; but i need a work around for this.

Let me show you an example as if if you click on the below link:

http://pages.modeln.com/Contact-Us---General-20_thankyoutest.html

you will find a pop up and it will shows an empty string; where as i want the whole URL value?

What i want basically is if some body find a link in like youtube comment box then i should get the whole URL not just http://www.youtube.com

Can you help me with that and?

SanfordWhiteman
Level 10 - Community Moderator

Re: Need to Track the reference URL ?

To ensure that you get the fullest possible Referrer info, unburdened by the browser's built-security measures, you should be running https://pages.modeln.com.    For example, click this guy: What Is My Secure Referrer? to see how you get better info that way.