Populate Referrer URL to a custom field

teresahsu
Level 2

Populate Referrer URL to a custom field

Hi everyone,

Is there a way to populate the Referrer URL to a custom field so we could report on that?

We are trying to figure out how people land on our forms. We have UTMs for the most part but the links could be shared without UTM populated or they could organic traffic.

Screen Shot 2021-05-13 at 5.48.24 PM.png

 

Thanks!

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Populate Referrer URL to a custom field

Sure.

MktoForms2.whenReady(function(mktoForm){
  mktoForm.addHiddenFields({
    "LastReferrerURL" : document.referrer
  });
});

Create Last Referrer URL as a Textarea.