A double opt-in campaign is where recipients must confirm that their information is correct before completing the sign-up process, minimising potential fraud. Therefore, we recommend that you always enable double opt-in for your signup process, especially if you offer a reward for signing up like a voucher code on the result page.
This is most commonly used for verifying the email address of the recipient, although you could apply a similar configuration to other outbound communications like SMS. To create a double opt-in campaign, you need to use a combination of Events and triggered Flows to correctly set the permissions.
How to Create a Double Opt-in Campaign
Creating the Person Data
Firstly, make sure you have the permission fields you need.
- Create a new boolean Person Data and name it 'EMAIL_PERMISSION'.
- Create a new timestamp Person Data and name it 'EMAIL_PERMISSION_UPDATE.
Setting up the Event
For the verification, you need an Event to set the EMAIL_PERMISSION for the recipient when they click the verification button.
- Create an Event and name it 'Verified Email Address'.
- Tick the 'Reset Enabled' and fill in your desired reset Conditions. In this example, we're using the value 'After number of time(s) triggered', set to '1'.
- Enable a Side Effect 'On' 1.
- Add a Side Effect set to 'EMAIL_PERMISSION' to 'True'.
- Add a Side Effect set to 'EMAIL_PERMISSION_UPDATE' to 'today'.
The 'Verified Email Address' Event with Side Effects
How to Create the Confirmation Page for Double Opt-in
- Create a new Web page with a 'User' Menu Item and name it 'Verify Email Confirmation'. Alternatively, you may choose to create the confirmation page externally. In this case, you can simply note the external URL of your confirmation page for later use.
- Customise the content of the Web page to show the confirmation for signing up.
- Save the Web page. If you offer a reward for signing up, you could place it on this page, thus ensuring that only recipients with a verified email address will be able to receive it.
The 'Verify Email Confirmation' web page with a voucher code
How to Create the Email for Double Opt-in
- Create a new Email and name it 'SU Email Verification'.
- Customise the content to notify the recipient, that they need to click a button in order to verify their email address.
- Add a call to action button to the email.
- Link the call to action button to the 'Verify Email Confirmation' Menu Item or the external confirmation page.
- Add the 'Verified Email address' event to the link.
- Save the email.
The 'SU Email Verification' Email with a call to action button with a link
Create the Flow
- Create a Flow and name it 'SU Email Verification'.
- Depending on your sign-up process, add a Trigger or a Target Group to the Flow.
- Add an Email Step to the Flow.
- Select your 'SU Email Verification' Email for the Email Step.
- Save the Flow.
A 'SU Email Verification' Flow with a configured Email Step
How to Test the Setup for Double Opt-in
To correctly test the configuration on Staging, you must attempt to recreate how a real recipient would sign up on Production. The process for signing up depends on your instance, but will often be reproducible either by importing a recipient with a specific set of data or using an API call to trigger a specific Event. Since the 'Verified Email address' Event sets the EMAIL_PERMISSION, the signup process must no longer set this Person Data.