SOLVED

Re: What's bettter? To get value from utm parameter or cookie?

Go to solution
florenzoNIP
Level 2

What's bettter? To get value from utm parameter or cookie?

Hi all, 

Quick question here. I am currently in the process of adding mkto_UTM Campaign & mkto_UTM medium hidden fields to my forms, and up until now, I was using the URL parameter selection to pull from because we use URL parameters to track our email efforts and our paid search. 

 

If I continue to set it up this way, and someone navigates to my landing page from a page with UTM parameters on it, but then doesn't convert and goes somewhere else on the site and converts from a different form, will the original UTM parameters carry through from the original source URL? 

 

My initial thought is no, not unless I change my default values to pull from cookies. However, if I update it to pull from cookies, will the form then ignore the URL parameters from the direct page? 

 

If I have to pick one or the other, the URL tracking is definitely more important, but ideally, I'd like to capture both! 

 

Thanks in advance! 

Felicia

1 ACCEPTED SOLUTION

Accepted Solutions
Vladislav_Vagn1
Level 5 - Community Advisor

Re: What's bettter? To get value from utm parameter or cookie?

You are correct in stating that if somebody navigates away from the LP with UTMs, then you will lose those values if they fill out a form on the next page, if you are not using cookies. That is because the link that they clicked to get to the next page probably does not have UTMs.

 

I am not sure what you mean by "URL parameters from the direct page?"

 

Having said that, in my personal experience we almost always use the cookies route. It helps keep track of where the person came from as they navigate the site. If they come in from one set of UTMs one day and don't fill out the form, then return later with another set of UTMs from another tactic and fill out the form on that session, the cookie values should update to the latest UTMs used - the tactic that lead to the conversion.

View solution in original post

4 REPLIES 4
Vladislav_Vagn1
Level 5 - Community Advisor

Re: What's bettter? To get value from utm parameter or cookie?

You are correct in stating that if somebody navigates away from the LP with UTMs, then you will lose those values if they fill out a form on the next page, if you are not using cookies. That is because the link that they clicked to get to the next page probably does not have UTMs.

 

I am not sure what you mean by "URL parameters from the direct page?"

 

Having said that, in my personal experience we almost always use the cookies route. It helps keep track of where the person came from as they navigate the site. If they come in from one set of UTMs one day and don't fill out the form, then return later with another set of UTMs from another tactic and fill out the form on that session, the cookie values should update to the latest UTMs used - the tactic that lead to the conversion.

SanfordWhiteman
Level 10 - Community Moderator

Re: What's bettter? To get value from utm parameter or cookie?

It's not really a "what's better" situation. You always want the most authoritative and relevant attribution info.

 

If there are UTM params on the current URL, certainly you need those — but if there aren‘t, and you have stored UTMs in a cookie, you need those just as much.

 

You can use the advanced Auto-Fill code here to seek values in multiple places:

 

MktoForms2 :: Auto-Fill w/Cascade v1.1.2

 

The fieldFillRules array seeks the value in each channel from top to bottom, i.e. this would seek the utm_campaign in the current URL, then look for a cookie of the same name:

 

   var fieldFillRules = [      
      {
         name : "Last_Campaign__c",
         channel: "query",
         selector: "utm_campaign"
      },
      {
         name : "Last_Campaign__c",
         channel: "cookie",
         selector: "utm_campaign"
      }
  ];

 

 

 

florenzoNIP
Level 2

Re: What's bettter? To get value from utm parameter or cookie?

Thank you both very much! I am going to see if I can use the advanced rules so I can capture both the utm parameters on the link in the email and the cookie value. I would go with only cookies but I am afraid our site is too slow and will not write the cookie fast enough to attribute the value to the form fill if I only use cookies. 

SanfordWhiteman
Level 10 - Community Moderator

Re: What's bettter? To get value from utm parameter or cookie?


I would go with only cookies but I am afraid our site is too slow and will not write the cookie fast enough to attribute the value to the form fill if I only use cookies. 

It’s not possible for a site to be too slow to use cookies. Setting a cookie is synchronous, so all other code waits for the cookie to be set.

document.cookie = "mycookie=myvalue;path=/;domain=example.com";
// anything you run here is guaranteed to see the cookie in the cookie store