Mautic Know-How
Mautic Know-How
Mautic Tutorials for Beginners & Tips for Specialists

The Perfect Double Opt-In

Double Opt-In (DOI) is annoying, but mostly considered necessary - and thus should at least work smoothly. In fact, it takes this little trick to achieve just that!

0. Basics

Let's start with: What problem are we trying to solve here? Hard to explain if you never encountered it yourself, but wide-spread nonetheless:

  • If a we send an email which request the user to confirm his opt-in (and, implicitely, his email address), as part of a Mautic campaign - then it may take several minutes for the mail to be sent, which is not only inconvenient, but definitely increases the dropout rate.
  • However, if we send the same email directly from the Mautic form, Mautic may not be able to recognize the click on the confirmation link when the campaign checks for the "Visits a Page" decision. Why? Because, attention: "Decisions" do not check for activities that took place in the past, but only wait for future ones!

So we have to find another way to check for the confirmation click (more precisely: for the visit to the thank you page). The trick: We use a Mautic "Tag" for this.

1. Create your Lead Form as a "Standalone Form"

...and send the DOI email from form action "Send email to contact".

As an additional form action, you will want to assign the contact to a segement such as "doi-started".

Mautic Form Action "Send Email to Contact"

2. Create a "Thank You" page as the link target in your Double Opt-In email

3. Configure this page to set Tag in Mautic

If your CMS does not provide buildt-in means for this, simple include this HTML snipper in your "Thank You" Landing Page:

<img src="https://m.mymautic.tld/mtracking.gif?tags=doi-ok" alt="Tag" />

where "https://m.mymautic.tld" is your Mautic's URL.

(In this example, set Tag that gets set is named "doi-ok").

4. In your DOI campaign, check for that Tag

Start your campaign from the segment you assigned above (i.e. "doi-started").

Unlike Decisions, Mautic's "Conditions" check for a current state, and a Tag that had been set in the past of course still part of the current state.

Mautic Condition Tag

5. If Tag does not exist: Wait for Page Visit

As discussed, checking for the Tag is only looking at state at the exact moment. In order to allow e.g. another 24 hours for those who did not have the Tag at this point, we use the normal decision "Visits a Page" (combined with a waiting time) as the next campaign step.

6. Summary: The perfect Double Opt-In campaign

Mautic Perfect DOI Campaign

Your browser is outdated!

Please update your browser to see this website correct. Update your browser now