Re: How do I create a smart list that includes the Referrer URL data from the activity log?

Anonymous
Not applicable

How do I create a smart list that includes the Referrer URL data from the activity log?

I want to start tracking how our customers are accessing the form on our site. Is there a way of creating a smart list that includes the Referrer URL in the Activity Log?

7 REPLIES 7
David_Desrosie2
Level 4

Re: How do I create a smart list that includes the Referrer URL data from the activity log?

Hi Joe,

I hope you don' mind If I update my answer - I did not initially get the part about form fill-out...

I have 3 options that come to mind. #3 is my preferred method...

1) You do have the option to grab the referrer by using a javascript that will put it in a hidden field in your Marketo form. Here is an article about it:  Re: Referrer Parameter

2) There is also a method to capture URL parameters from cookie value. Documented method does not actually grab the entire referrer, but rather some URL parameters, but I don't see a reason why it would not work for the entire referrer with a few tweaks to the script. (If you chose that option let me know we have an updated version of this script that  I can share.

Get URL Parameters via JavaScript on a Marketo Landing Page

3) My preferred option is to capture it at the visit no code required. I have a similar campaign currently running. You can do this using a smart campaign that triggers on visits to any web page and then stamp the referrer using the {{trigger.Referrer}} token in a dedicated custom field. I also filter out internal traffic using domain is not perkuto.com (our own domain)

Here is what it looks like.

First, Capture the Referrer on Page Visit

Screen Shot 2015-10-08 at 4.07.25 PM.png

Screen Shot 2015-10-08 at 4.07.56 PM.png

Then, you can , upon form fillout, pull the value that you just stored in the last referrer field as the last referrer for this specific form fill-out.

Other related resources: Set a Hidden Form Field Value - Marketo Docs - Product Docs

Anonymous
Not applicable

Re: How do I create a smart list that includes the Referrer URL data from the activity log?

Thanks. I will give it a try.

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I create a smart list that includes the Referrer URL data from the activity log?

Sounds like a recipe for a slow instance: trigger campaign running on every Visits Web Page event on any page?

Anyway, Joe wants this only on form pages, so a constraint on the trigger would help.  But even more lightweight is doing

MktoForms2.whenReady(function(form){

     form.addHiddenFields({

          LastReferrer : document.referrer

     });

});

Still, bear in mind that referrer is not always available, say from https://some-site-where-you-placed-an-ad.com to http://your-landing-page-domain.com you will not get a referrer (SSL --> non-SSL).

David_Desrosie2
Level 4

Re: How do I create a smart list that includes the Referrer URL data from the activity log?

And yes as Sanford mentionned, on high traffic sites, this can become a bit heavy to process...Haven't seen a difference since using it on on my end.

Tania_Bronstein
Level 1

Re: How do I create a smart list that includes the Referrer URL data from the activity log?

I'm currently trying to capture last referring source without going the custom cookie route, and tried your #3 option above. Is the value that the {{trigger.Referrer}} token is collecting the same as the Original Referrer field? Or should this token be capturing the most recent URL visited prior to visiting my website?

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I create a smart list that includes the Referrer URL data from the activity log?

The {{trigger.Referrer}} is the referrer in the trigger context, that is, at the time the trigger is triggered.

This referrer can be either on or off your site.  David's excludes hits when the referrer is onsite, so implicitly the value only contains the most recent offsite URL.

This is still not as efficient or flexible as having the lead manage their own history, i.e. using cookies.

Tania_Bronstein
Level 1

Re: How do I create a smart list that includes the Referrer URL data from the activity log?

Thank you, very helpful!