All Collections
FAQs
Website
How do I implement double opt-in in my Nation?
How do I implement double opt-in in my Nation?

Improve your email deliverability and privacy by asking for an email confirmation from your new supporters.

Updated over a week ago

📌 Note: This solution is for Standard and Enterprise Nations. For customers with limited access to workflows, use the following solution below.

Double opt-in is an email address verification system. In a nutshell, you will ask all the new people in your Nation to confirm their email addresses after they add their names to a sign-up form or any action page.

This process may look more time-consuming and less conversion efficient than single opt-in. However, it will help you protect your email deliverability and improve the protection of your users’ privacy.

  1. Create a new signup page on your website by going to Site > + New Page. Adjust the Signup settings tab so that people who fill out this signup form are tagged with a specific tag, such as "Double opt-in". You can leave the page status as "Unlisted" because users will have a direct link to the page. Disabling the social share prompt on this page and redirecting all the signups to a thank you page is essential.

  2. Navigate to the Template tab of this page and remove all of the code. You should then paste the following code into the Template and click Save and publish changes:

<div id="content">

<div class="form-wrap">

<div class="form">

<h2 id="confirming">Confirming email address...</h2><br>

{% form_for signup %}

<div class="form-errors">{% error_messages_for signup %}</div>

<div class="row-fluid" style="visibility:hidden">

<div class="span6"><label for="signup_email">Email</label><input class="text" id="signup_email" name="signup[email]" type="email"/></div>

</div>

<div class="row-fluid" style="visibility:hidden;">

<div class="span6"><label class="checkbox" for="signup_email_opt_in"><input name="signup[email_opt_in]" type="hidden" value="1" checked /><input class="checkbox" checked="checked" id="signup_email_opt_in" name="signup[email_opt_in]" type="checkbox" value="1" /> Send me email updates</label></div>

</div>

<div style="visibility:hidden;">

{% submit_tag "Confirm", class:"submit-button" %}

<div class="form-submit"></div>

</div>

{% endform_for %}

</div>

</div>

</div>

<script>

jQuery(function(){

jQuery('.submit-button').click();

});

</script>

3. Create a new Workflow (for instance: Double opt-in confirmation XYZ Petition/event/signup…). This Workflow is now the auto response for your new lead-generation campaign. Remember to attach this automation to the action page and disable the action page auto response.

4. Add an action (email blast) to your email confirmation workflow. The time delay is not required as we want the user to receive this message immediately. Important: check the "When the recipient clicks on links to your website in the email, automatically add their email address to forms" in the email blast settings tab.

5. Edit the content of your confirmation email and include a link to the new signup page (1.) To prevent successfully double-opted-in people from receiving a confirmation link, you can use the following Liquid logic:

{% if recipient.tags contains "Double opt-in" %}

Thank you for your support!

{% else %}

Please confirm your email

{% endif %}

6. Users will now be prompted so confirm their email address after taking action on your page. From here on out, you should make sure to only send email blasts to people with the "Double opt-in" tag and make a regular deletion of people who haven’t received that tag.

How do I implement double confirmation if I have limited access to workflows?

1. Create a new signup page in your website by going to Site > + New Page and choosing Signup as the page type. You can leave the page status as "Unlisted" because users will have a direct link to the page. It is important to disable the social share prompt on this page.

2. Navigate to the Template tab of this page and remove all of the code. You should then paste the following code into the Template and click Save and publish changes (the following code differs from step two in the previous section).

<div id="content">

<div class="form-wrap">

<div class="form">

<h2 id="confirming">Confirming email address...</h2><br>

{% form_for signup %}

<div class="form-errors">{% error_messages_for signup %}</div>

<div class="row-fluid" style="visibility:hidden">

<div class="span6"><label for="signup_email">Email</label><input class="text" id="signup_email" name="signup[email]" type="email"/></div>

</div>

<div class="row-fluid" style="visibility:hidden;">

<div class="span6"><label class="checkbox" for="signup_email_opt_in"><input name="signup[email_opt_in]" type="hidden" value="1" checked /><input class="checkbox" checked="checked" id="signup_email_opt_in" name="signup[email_opt_in]" type="checkbox" value="1" /> Send me email updates</label></div>

</div>

<div style="visibility:hidden;">

{% submit_tag "Confirm", class:"submit-button" %}

<div class="form-submit"></div>

</div>

{% endform_for %}

</div>

</div>

</div>

<script>

var getUrlParameter = function getUrlParameter(sParam) {

var sPageURL = decodeURIComponent(window.location.search.substring(1)),

sURLVariables = sPageURL.split('&'),

sParameterName,

i;

for (i = 0; i < sURLVariables.length; i++) {

sParameterName = sURLVariables[i].split('=');

if (sParameterName[0] === sParam) {

return sParameterName[1] === undefined ? true : sParameterName[1];

}

}

};

var eaddress = getUrlParameter('email');

document.getElementById('signup_email').value = eaddress;

jQuery(function(){

jQuery('.submit-button').click();

});

</script>

3. In the auto-response email templates for each page on your website, you should include a link to this page with "?email={{ recipient.email }}" appended to the end of it.

For example:

{% if recipient.tags contains "Double opt-in" %}

Thanks for signing up!

{% else %}

Thanks for signing up! To confirm that you'd like to get emails from us, please click here: <a href="brianpalmer.nationbuilder.com/confirmation?email={{ recipient.email }}">CONFIRM EMAIL</a>

{% endif %}

Users will now be prompted to confirm their email address after taking action on your page.

Did this answer your question?