This document will guide you through the basics of setting up double opt-in functionality for your users. A double opt-in is a good practice to follow in order to improve your deliverability and/or comply with local laws like CASL in Canada.
double_optinattribute to track each person’s status
- A data-driven segment, either for people without the
double_optinattribute or for new users depending on your strategy
- A segment-triggered campaign where we’ll send an email with a link people can click to opt in
- Another data-driven segment for people who have clicked the opt-in link link
First and foremost, we’ll need an attribute for each person that tracks whether or not they’ve been through the double-opt in process, and what they’ve chosen. Let’s call this attribute
Then, we’ll need a data-driven segmentA group of people who match a series of conditions. People enter and exit the segment automatically when they match or stop matching conditions. to trigger the double opt-in campaign. For this example, we’ll use a condition of “
double_optin does not exist”. You can use a different segment if you want—like a data-driven segment for new users.
Create a segment-triggered campaign using the segment you created in the previous step.
Your first workflow action will send an email with a link your audience can click to confirm that they want to opt-in.
Make sure the double opt-in URL is unique
You can use any URL for the link, as we’ll track the clicks on a link matching a specific URL. Make sure it’s a unique URL either by creating a dedicated page to link to, or by adding a URL variable such as
?double_optin=true to the URL.
Now that we have the email created, we’ll need a second data-driven segment for people that clicked the opt-in link. Create your new segment before you finish setting up your campaign.
Now that we have that second segment, we can complete the setup of our campaign.
First, we’ll add a Wait Until workflow action and use the segment we just created as the condition that we want to wait for. We’ll also add a maximum wait time of 1 week before moving to the next action. This lets us consider people who haven’t clicked within 7 days of receiving the email as not opted-in.
Then, we’ll add a True/False Branch using the same segment as the condition we want to evaluate. That way, we’ll be able to perform different actions if the user going through the campaign clicks the double opt-in link in the email or not.
Last, but not least, we’ll add a Create or Update Person action in each branch to update the
Your campaign should look like this! When you’re done, activate your campaign to begin processing double opt-ins.