Double opt-in

Double opt-in is a system that requires a user to confirm the subscription by clicking on a link in email before including them in email list. This is important to have clean subscriber database to maintain a good emailing reputation

Creation

1) At first, you can use standard subscription template of Exponea web layer, and name it Subscription banner. However you need to remove this part from the code

self.sdk.update({ email: email });

This will ensure that the customers are not assigned email attribute just by filling in the web layer

2) Create a new web layer that will be used to confirm the customers that they are subscribed. It should only be shown on URLs containing #thank-you. You can use a web layer of your choice, e.g. Leaderboard

DOI

3) Create a new customer aggregate that will get the information about the email address from the web layer event, which is created when subscribing

The information is stored in the attribute “subscription_email”, and whole aggregate should look like this

DOI aggregate

4) Create a new scenario, that will send the email to customers for them to confirm. Moreover, the scenario should also change the customer attribute once they confirm the email. Whole scenario should look like this:

DOI scenario

Top branch will take care of the email, and the bottom one will take care of the attribute. The top branch should include an on event trigger with following settings:

DOI first trigger

The email has to include a link that will send customer to your web page with #thank-you (e.g. www.exponea.com#thank-you). Moreover, the email cannot be sent to the customer that matched the scenario, but to a personalized email address based on the aggregate, written like this

{# subscription email #}{{ aggregates['Aggregate ID'] }}

You can also get this link in personalization wizard

 

The bottom branch will be triggered by the thank-you web layer

 

and will be sent only to people that really clicked the email, not only visited the web page

 

Afterward, you will need to set the email via set attribute node. You will need to use the same aggregate as before to set the value.

 

When all of the above is done, you have a double opt-in scenario which should prevent you from having database with non-existent email address

Updated on November 15, 2017

Was this article helpful?

Related Articles