SOLVED

Re: How to add a "Not you" return visitor link to a Progressive Profile form

Go to solution
Craig_Boren
Level 2

How to add a "Not you" return visitor link to a Progressive Profile form

We've created a progressive profiling form and it's working exactly as intended (i.e. showing only those fields that we want for a return visitor). However, we would really love to take advantage of the "Not You" return visitor Custom HTML feature in Marketo by adding it to our Progressive Profile form. As far as I am aware, Marketo only allows either/or, not both. Is there a way to do this? (see screenshot)

notyou.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How to add a "Not you" return visitor link to a Progressive Profile form

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: How to add a "Not you" return visitor link to a Progressive Profile form

Craig_Boren
Level 2

Re: How to add a "Not you" return visitor link to a Progressive Profile form

Thanks Sanford! This is exactly what I was looking for. You are a rockstar!

Craig_Boren
Level 2

Re: How to add a "Not you" return visitor link to a Progressive Profile form

I implemented the FormsPlus::Util library onto a page, and it's working great! (exactly as expected) Do you know how I would hide the "Not You" button, and only show it when that Marketo tracking cookie exists?

SanfordWhiteman
Level 10 - Community Moderator

Re: How to add a "Not you" return visitor link to a Progressive Profile form

I don't think you mean if the cookie exists, you mean if the cookie is associated with a known lead.

The easiest way to add that logic is to hide the Not You? by default, then add a class to the element to unhide it if there are any non-null Pre-Filled fields*:

MktoForms2.whenReady(function(form){

  if (

    window.mktoPreFillFields &&

    Object.keys(mktoPreFillFields)

    .map(function(key){

      return mktoPreFillFields[key];

    })

    .filter(function(value){

      return value !== null;

    })

    .length

  ) {

   // do something to unhide the Not You?, like classList.add() etc.

  }

});

*This doesn't give absolutely full coverage because it's possible, if extremely unlikely, that all the relevant fields are currently null, including the Email Address, but the lead is still in the database.

A complete solution would be using the /getKnownLead endpoint but that's another kettle-ball of wax-fish.