Double opt-in: what it is and how to configure it
What is double opt-in
Double opt-in is a subscription to an email newsletter that requires additional confirmation of the email address by the recipient.
You are most likely familiar with this type of subscription. You may come across it when you leave your email address in the subscription form on a website to receive a newsletter with useful articles. This is the first stage of this type of subscription.
Then you receive an email that asks you to confirm your email address:
You agree to receive the newsletter by clicking the link. This is the second stage of this type of subscription.
Advantages of double opt-in
- It improves the sender's reputation with the email provider.
Since only those who are really interested in your content and have confirmed their consent get into the newsletter, this reduces the number of spam complaints and unsubscriptions. High activity and low number of complaints have a positive effect on your reputation as a sender, which in turn increases the deliverability of your emails.
- It does not overload the subscriber base with invalid email addresses.
A two-stage subscription "clean out" inactive and disinterested subscribers.
Only those subscribers who regularly log into your mailbox and check emails remain in your database, as well as those who, in addition, are ready to actively "participate" in a dialogue with your brand. Such subscribers are ready to receive newsletters, read about offers from the campaign, and visit the site using links.
- It reduces the risk of emails getting into the spam folder
Emails containing an offer to confirm a subscription increase user confidence in the campaign. The client is confident that interaction with your campaign will take place only after his consent, and you will not overload his mailbox with unnecessary emails. This approach to mailing lists is almost guaranteed to reduce the risk that in the future a user will mark emails from your campaign as "spam"
How to set up double opt-in
To guide a client through a two-stage subscription, you need to create a confirmation letter template and a trigger campaign or script for sending the letter.
Create a template
You can send an email only with this template to unconfirmed users. Let's create this template.
Go to the “Templates” section. If you have a ready-made template, select it. If you do not have it, create a new one.
Click «Add a link» in the «HTML email version» field to add a confirmation link to the template.
Enter the URL of the link and the text. Tick the “This is a confirmation link” box. Click “Okay”.
As you can see, a new line has appeared in the email template:
<a href="http://confirm_example.com " title="Confirm subscription" confirm-link>Confirm email</a>
This is the confirmation link. Its main difference from regular links is the presence of the confirm–link attribute. Here's how our template will look in preview mode:
Sending an email
Now you need to send a confirmation letter to your subscribers. There are several ways to do this:
The status of the client who opens the email and clicks on the confirmation link will automatically change from "Not confirmed" to "Subscribed". After that, you can send him the usual templates.
In the following sections, we will explain in detail how to configure them and what options exist for getting client data to the platform
Trigger campaigh
Let's consider a trigger campaign. Go to “Campaigns” → “Triggers”. Select the email channel, subscriber base and resource to which you want to confirm the subscription:
Select the template type — “Opt-in messages”:
Only templates that contain a confirmation link are available for this type of message. Select the appropriate template:
Now you need to set up a trigger . The trigger is configured depending on where the data will come from to the platform.
Subscribtion update
If the client's profile is not yet in the subscriber database, you can create a profile using an API request. The request must specify that the client's status is "Unconfirmed", this is necessary for further trigger triggering.
A trigger is a condition or event that will activate (trigger) your newsletter. Select the type of event — “Subscription update”. Specify the resource and subscription status “Unconfirmed”.
Thus, you tell the platform: "Every time a user's subscription status changes to "Unconfirmed", send him an email."
Now you can send out your newsletter to your customers. Click the activation icon in the context menu of the trigger campaign.
Now the trigger will be started every time a corresponding request is sent to the platform.
Example of the API request "…/profiles/import", which transmits the subscription status "Unconfirmed":
{
"token": "qwerty123",
"db_id": 1,
"matching": "email",
"email": "john@example.com",
"data": {
"email": "john@example.com",
"subscriptions": [
{
"channel": "email",
"email": "john@example.com",
"resource_id": 1,
"status": "unconfirmed"
}
]
}
}
API trigger call
Another example is an API request that can be triggered when a client fills out a form on an external server. If the user has filled out the subscription confirmation form and specified his email address, the system can send a request to the Altcraft platform and a trigger will be triggered.
Create a new campaign and select the required template. Select the event type – "API trigger call" and specify which database this trigger will work for:
Now you can send out your newsletter to your customers. Click the activation icon in the context menu of the trigger campaign.
Now the trigger will be started every time a corresponding request is sent to the platform.
Example of the API request "…/campaigns/triggers/importandstart/":
{
"token": "care13fulwi3thttha2taxe43euge2ne",
"matching": "email",
"email": "example@example.com",
"detect_geo": true,
"data": {
"_fname": "Olly",
"_lname": "Lambert",
"email": "example@example.com",
"phones": [
"+79000000000"
],
"_bdate": "1990-02-22T21:00:00Z",
"custom_field": "custom_value",
"subscriptions": [
{
"channel": "email",
"email": "example@example.com",
"resource_id": 1
},
{
"channel": "phone",
"phone": "+79000000000",
"resource_id": 1
}
]
},
"trigger_id": 13,
"timeout": {
"days": 0,
"hours": 0,
"minutes": 5
},
"custom_data": {
"sending_time": "12:31:12"
},
"content": {
"page": "registration_form"
},
"attach": [
{
"data": "data:text/csv;base64,5LuK5pel44GvCg==",
"name": "Attach.txt"
}
]
}
Form profile import
You can create your own form, when filling in which the user's data will be entered into the database, as well as filling in which will lead to the profile being included in the trigger campaign. You can read more about creating a form and configuring the import in our article.
Create a new campaign and select the required template. Select the event type – "Form profile import" and specify which database this trigger will work for:
Now you can send out your newsletter to your customers. Click the activation icon in the context menu of the trigger campaign.
When importing via pop-up
Customer data can be uploaded to the platform via a pop-up. You can read more about how to set up a data capture popup in this article.
Create a new campaign and select the required template. Select the event type – "When importing via the form" and specify which database this trigger will work for:
Now you can send out your newsletter to your customers. Click the activation icon in the context menu of the trigger campaign.
Scenario
To avoid creating multiple separate trigger campaigns, create an automation script. This will allow you not only to take into account all the ways the client gets to the platform, but also to guide each client, for example, through the welcome chain, and also allow you to "not lose" the client if he ignored the letter or did not agree to receive the newsletter.
First, let's go to the "Scenario" section and create a new one. Read more about creating a script in our article.
Let's add all possible capture triggers:
Let's add the "Email" element and configure it so that the client receives a confirmation letter as part of the campaign we need. Select a channel, a resource, specify the type of message "Subscription confirmation" and select a template with a confirmation link:
We connect the elements. Here's what the scenario looks like at this stage:
Then we will set a pause. Let's specify that the platform waits two days for confirmation:
Let's create a condition. Specify the condition "Click on the Confirm link in the Email" and set the selection condition "at least [n] times in the last [x] days of campaigns". This is necessary so that the platform takes into account the click on the confirmation link only within this campaign, and does not analyze all the actions of the client.
Specify the value [n] "1", which indicates that the client clicked on the link once. Also specify the value [x], which corresponds to the number of waiting days.
Select the resource where you sent the confirmation email and the campaign:
Next, you need to think about what the platform will do if the client clicked and if he did not click on the link. For example, if the client has performed an action and confirmed the subscription, a welcome letter will be sent to his email.
An example of what a customized "Email" element with a welcome letter might look like:
Go to “Data” → “Profile databases”. Find the database with the profiles for which you want to set up a double opt-in. Click “Update profiles” in the context menu:
If you want to add double opt-in to a certain group of profiles, segment the audience. Add conditions that users must meet in order to be in this group:
Then specify what needs to be done next with this group. In our case, it is “Add a subscription”. The source of the subscription is either a profile field or a resource:
Select a resource. Please note that an email channel must be configured in this resource. Set the subscription status “Unconfirmed”:
If you have selected “Profile fields” as a resource, specify this field — “Email”:
Start updating profiles by clicking “Update” on the top of the screen:
If you import and update profiles using API request, set the following parameter: "status" : "unconfirmed".
Step 2. Create a template with a confirmation link
You can send an email only with this template to unconfirmed users. Let's create this template. Go to the “Templates” section. If you have a ready-made template, select it. If you do not have it, create a new one. Click «Add a link» in the «HTML email version» field to add a confirmation link to the template.
Enter the URL of the link and the text. Tick the “This is a confirmation link” box. Click “Okay”.
Now you can see a new line in your email template:
<a href="http://confirm_example.com" title="Confirm the email" confirm-link>Confirm your email</a>
This is the confirmation link. Its main difference from usual links is the confirm-link attribute. Here you can see how the template looks in preview mode:
Step 3. Send an email that asks the user to confirm their subscription
Now you need to send a confirmation letter to your subscribers. There are several ways to do this:
Let's consider a trigger campaign. Go to “Campaigns” → “Triggers”. Select the email channel, subscriber base and resource to which you want to confirm the subscription:
Select the template type — “Opt-in messages”:
Only templates that contain a confirmation link are available for this type of message. Select the appropriate template:
Now you need to set up a trigger . A trigger is a condition or event that will activate (trigger) your newsletter. Select the type of event — “Subscription update”. Specify the resource and subscription status “Unconfirmed”.
Thus, you tell the platform that every time the user's status changes from «subscribed» to «unconfirmed», it needs to send them an email.
Now you can send out your newsletter to your customers. Click the activation icon in the context menu of the trigger campaign.
The setup is now complete.
Conclusion
On the one hand, double opt-in complicates the subscription, since it requires more actions from the user. Some people simply forget to log in to the mailbox and confirm their email addresses. However, this is the only disadvantage. Double opt-in allows you to get more interested subscribers and reduce the percentage of complaints about your newsletter.
What is double opt-in
Advantages of double opt-in
How to set up double opt-in
Create a template
Sending an email
Trigger campaigh
Subscribtion update
API trigger call
Form profile import
When importing via pop-up
Scenario
Step 2. Create a template with a confirmation link
Step 3. Send an email that asks the user to confirm their subscription
Conclusion