Re: Disabling Munchkin Cookie, but maintaining Pre-fill

AJ_Valles3
Level 1

Disabling Munchkin Cookie, but maintaining Pre-fill

Hello,

Im designing a events survey for outside sales to send on responses on how their follow-up with certain executives went.

Each rep will get 4 internal email alerts for 4 different customers. What we'd like to accomplish is having one landing page for all 4 of these leads: we'd like our sales rep to be able to click into each email, and have the lead information pre-populated for each of these to avoid any data loss or having to require the sales rep to enter the information manually each time.

Any help?

I tried this: https://blog.teknkl.com/pre-fill-any-site-any-form/ from Sanford Whiteman

With no luck, probably the incorrect solution.

8 REPLIES 8
Grace_Brebner3
Level 10

Re: Disabling Munchkin Cookie, but maintaining Pre-fill

Hey AJ,

Have you tried URL parameters? See: Set a Hidden Form Field Value - Marketo Docs - Product Documentation

I would think that you could just set up URL parameters on the link in the email alerts to populate with lead token values, and these would then populate into the form even if you disabled munchkin tracking/.

SanfordWhiteman
Level 10 - Community Moderator

Re: Disabling Munchkin Cookie, but maintaining Pre-fill

The external site Pre-Fill code is only necessary for, well, external sites. Marketo-hosted LPs, which I assume this one is, have Pre-Fill built in.

Pre-Fill also doesn't require Munchkin when you click on a Marketo email link -- it *cannot* depend on Munchkin, because the cookie is only set after the page is rendered! Rather, it depends on the cookie *or* on the mkt_tok query param, which uniquely identifies the lead + email.

The problem you're actually facing doesn't have to do with Munchkin, but with the fact that alerts don't populate the mkt_tok for the original lead.

As Grace suggests, you can pass the original lead's values as URL parameters. But you can't natively fill visible fields from URL params, only hidden fields. So this isn't enough on its own; you also need supplementary JS on the page, which I'll supply later.

AJ_Valles3
Level 1

Re: Disabling Munchkin Cookie, but maintaining Pre-fill

Awesome thanks!

I can use the above to fill in UTM and other hidden fields through the URL, but not to populate the visible fields im using correct?

Screen Shot 2018-08-29 at 3.52.15 PM.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Disabling Munchkin Cookie, but maintaining Pre-fill

What do you mean by "the above"?

Jay_Jiang
Level 10

Re: Disabling Munchkin Cookie, but maintaining Pre-fill

You can write url parameters to visible fields using some javascript, but yeah you can't set it up for visible fields like hidden fields in the forms editor.

SanfordWhiteman
Level 10 - Community Moderator

Re: Disabling Munchkin Cookie, but maintaining Pre-fill

You can use this older demo: MktoForms2 :: URL Fill v1.0.1

Make sure to download the all-important FormsPlus::Util.js library (from the CodePen HTML pane) and upload to your own server.

Then, after including the FormsPlus::Util, pop the code from the CodePen JS pane in another <script>.

You don't need to use any of the fancy options, just a basic setup block like:

var urlFields = [

  {

   mktoField: "FirstName",

   urlParam: "fn"

  },

  {

   mktoField: "LastName",

   urlParam: "ln"

  },

  {

   mktoField: "Email",

   urlParam: "email"

  }

];

AJ_Valles3
Level 1

Re: Disabling Munchkin Cookie, but maintaining Pre-fill

Thanks Sanford, so if I did it correctly on the js. and script on Landing Page

this "https://go.nutanix.com/Event-Survey-Landing-Page-Template-Version-1.html?fn={{lead.First Name}}&ln={...

should populate the correct information.

https://go.nutanix.com/Event-Survey-Landing-Page-Template-Version-1.html?fn=AJ&ln=Valles&email=ajval...

It didnt work for me for whatever reason, might have conflicting information on here.

I put the code from the <head> on down in here.

A Pen by Anthony J. Valles

SanfordWhiteman
Level 10 - Community Moderator

Re: Disabling Munchkin Cookie, but maintaining Pre-fill

  • You didn't include the FormsPlus::Util script
  • You included the other code via an http:​// link, but your pages run over https:​// so you can't do this (you'll see the error in your F12 Console, Blocked loading mixed active content “http:​//yourjavascript.com/1118503881/basicsetup-block.js”).