Managing email opt-in on subsequent form visits | Community
Skip to main content
Level 2
April 2, 2016
Question

Managing email opt-in on subsequent form visits

  • April 2, 2016
  • 4 replies
  • 5174 views

I am setting up a form for compliance with CASL. I don't want to continually have the email opt-in field unchecked on the form when someone who has previously expressly opted-in engages with another form.

Can anyone tell me if, on subsequent form visits, for a lead who has an email opt-in field value is true, will Marketo pre-fill the form by placing a check-mark in the opt-in box on the form (if Form Pre-fill is enabled of course).

If that's not the case, I think the best option is to use progressive profiling and place this question first in the progressive profiling list of fields, with a "Number of Blank Fields" is 1. I believe that should work. Please let me know if you don't think it will.

Thanks!

Mark

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

April 2, 2016

Marketo "WILL" pre-fill the opt-in field value always upon form load. With that said I like the idea of using progressive profiling to hide this field after it is filled in by the visitor.

Level 2
April 3, 2016

Thanks for validating that it will pre-fill the form on subsequent visits Mark!

Dan_Stevens_
Level 10
April 3, 2016

Remember, form pre-fill does not work on forms that are embedded on non-Marketo LPs

SanfordWhiteman
Level 10
April 2, 2016

If that's not the case, I think the best option is to use progressive profiling and place this question first in the progressive profiling list of fields, with a "Number of Blank Fields" is 1. I believe that should work. Please let me know if you don't think it will.

Actually, this won't work.  Non-nullable boolean fields aren't a fit for ProgPro.

But there's no need to use ProgPro. A little Forms 2.0 JS will do it:

<script>

MktoForms2.whenReady(function(form){

  var formEl = form.getFormElem()[0],

      formRowEls = formEl.querySelectorAll('.mktoFormRow');

      Array.prototype.forEach.call(formRowEls,function(rowEl){

        if (rowEl.querySelector('#OptedIn[value="yes"]'))

          rowEl.style.display = 'none';

      });

}); 

</script>

Dan_Stevens_
Level 10
April 2, 2016

Sandy, will this work for forms embedded on non-Marketo LPs as well?  If so, your solution would be more reliable than the one I just posted below.

SanfordWhiteman
Level 10
April 2, 2016

Sandy, will this work for forms embedded on non-Marketo LPs as well?

Not natively, since you have the Prefill problem.

But with one of my special sauces...

Dan_Stevens_
Level 10
April 2, 2016

Here's how we do it.  When someone clicks the opt-in checkbox, we have a master smart campaign that processes all opt-in requests, as well as our double-opt-in process for Germany (where an email is then sent out to get a user to confirm their opt-in preference).  Within that campaign, we capture the date of the opt-in in a custom date field. 

Then for all subsequent visits, we use a visibility rule for the opt-in field within the form.  We include the opt-in date field as a hidden field (form pre-fill turned on).  If the date field does not contain a value, then we show the opt-in field.  The only issue is if you embed this form on a non-Marketo LP (since form pre-fill does not work).  And unfortunately, you can't use block field updates here since you're dealing with a boolean field (block field updates does not work for boolean fields).  Block field updates is preventing a checkbox from being checked (has never contained a value)

April 2, 2016

I love the idea of using a Marketo custom field to time stamp the data and make that become part of the meta-data associated withthe person.

Dan_Stevens_
Level 10
April 2, 2016

Notice we're also capturing the Marketo program that was responsible for the opt-in.  As you can probably tell, our company has a very strict data privacy team - so in case we're ever audited (or someone complains), we can share both the date the user opted in as well as which marketing activity.

Dory_Viscoglio
Level 10
April 4, 2016

Like Dan, we also use a conditional visibility "progressive profiling" hack. I don't like how restrictive progressive profiling can be with ordering of fields, so we rely on if a hidden field has a value to show or not show an opt-in field.