Joe Reitz

Pro-Tip: Disable Cookies on a Landing Page

Discussion created by Joe Reitz Champion on Aug 28, 2015
Latest reply on Jun 1, 2017 by Sanford Whiteman

I've been trying to figure out a way to disable cookies on certain forms. I had browsed around the community and Marketo Docs, but couldn't find a straight answer to my question. Probably operator error... whatever. I ended up getting a great solution directly from our Marketo consultant, so I thought I'd share to hopefully save someone else the hassle.

 

In the course of time, you may have created a landing page that you didn't want to capture cookie from. The most common example would be an on-site registration form for a tradeshow visitor, but we've also had it happen where a sales rep would log on to a landing page and utilize our appointment setting forms on behalf of their customers. In either scenario, you don't necessarily want Marketo to assume that the person that filled out the form was actually the same person entered into the fields. Simply by inserting the below script onto your landing page, you can effectively block your forms from capturing cookie data.

 

<script>

MktoForms2.whenReady(function (form){

form.addHiddenFields({"_mkt_trk":""});

form.onSubmit(function (){

   form.vals({"_mkt_trk":""});

});

});

</script>

 

On a standard landing page, you can just drag in the HTML widget, paste this script in, and you're done. On a guided landing page, you'll have to create a duplicate non-cookied template, and throw that script into the header like you normally would.

Outcomes