Double opt-in in Mautic means a new subscriber confirms the address before any marketing email goes out. Add a welcome offer and the flow gets more interesting: every confirmed subscriber should get their own voucher code, and every code should go to one person only. Here is how we design such a flow, using the one we rebuilt when we moved a German B2B distributor from Marketo to Mautic.
Why does double opt-in matter in Germany?
In Germany double opt-in is standard practice for newsletters. German competition law requires prior express consent for email advertising, and the GDPR (Article 7) says the sender must be able to demonstrate that consent. A ticked box in a form shows that someone typed an address. It does not show that the owner of the mailbox agreed. The confirmation click, with its date, closes that gap.
The consent record has to answer three questions for every contact: when did the person agree, through which form, and when did they confirm? It also has to survive a platform change. Migrated contacts bring their history, and new sign-ups must land in the same fields, so one report covers both.
The client’s data protection officer or legal counsel sets the rules. Our job is to build a flow that follows them and leaves a clean trail.
What does the flow do, step by step?
The flow we built in Mautic has five steps:
- Sign-up. A person fills in the newsletter form on the client’s own subdomain.
- Confirmation email. Mautic sends an email with a confirmation link.
- Reminders. If the person does not click, Mautic sends up to two reminders.
- Confirmation. The person clicks the link. Mautic records the double opt-in flag and the date of consent on the contact by itself.
- Welcome email. The confirmed subscriber gets a welcome email with a personal voucher code.
Only the last step needed custom work. Steps one to four use standard Mautic forms, emails and campaigns.
How should you design the consent fields in Mautic?
Start with the fields. The flow writes to them, segments read from them, and the migration fills them.
Mautic has a built-in Do Not Contact list for the email channel, with a reason (unsubscribed, bounced or manual) and a comment. Use it for every “do not send” state. Mautic checks it before every marketing send. It will not check a custom “unsubscribed” checkbox.
Positive consent needs custom contact fields, because Mautic has no native double opt-in field. A minimal set:
| Field | Type | Written by |
|---|---|---|
| Double opt-in confirmed | Boolean | Campaign, at confirmation |
| Double opt-in date | Date/time | Campaign, at confirmation |
| Opt-in source | Text or select | Form, hidden field |
| Data processing consent | Boolean | Form checkbox |
| Data protection notice accepted | Boolean | Form checkbox |
The source field tells you whether a person joined through the newsletter box, an event page or the shop. Mautic also stores every form submission with its date and IP address, a second record of the sign-up.
What to keep from Marketo’s consent cluster
Our audit of the client’s Marketo instance found a whole cluster of consent and deliverability fields: double opt-in and its date, data processing and data protection consent, unsubscribe flag, date and reasons, invalid and suspended flags with causes, bounce details, blocklist and do-not-call. We sorted them into three groups:
- States that block sending (unsubscribed, invalid, suspended, blocklisted, bounced) become Mautic Do Not Contact entries with the matching reason.
- Proof of consent (double opt-in flag and date, data processing and data protection consent) becomes custom fields with the original timestamps.
- Context for the record (original unsubscribe date and reason) stays as reference fields, so the “when” and “why” from Marketo are not lost.
How do you build the flow from standard Mautic parts?
You need a form, a campaign, three or four emails and a segment. No plugin is required for the consent part.
The sign-up form
Build the newsletter form in Mautic and embed it on the client’s subdomain. Keep it short: email address, the consent checkboxes your legal team requires, and the hidden source field. A form linked to a campaign starts that campaign on submission.
One form action deserves a decision. Mautic offers “Remove Contact from Do Not Contact list” as a form action. It suits a form where a former subscriber clearly asks to come back. In a double opt-in flow, many teams prefer to lift the Do Not Contact entry only after the confirmation click, through the campaign action “Remove Do Not Contact”. Settle this with whoever owns the consent policy.
The campaign: confirmation and reminders
The campaign starts with the form as its source. Inside the campaign builder:
- Send Email: the confirmation email. Mark it as transactional. It asks for consent, so it is not a marketing message.
- Clicks Email decision on that email. The “yes” path leads to the confirmation steps.
- On the “no” path, after the interval you choose, Send Email: reminder one, with its own Clicks Email decision.
- Reminder two follows the same pattern.
Each “yes” path uses Jump to Event to reach one shared confirmation step. You build that step once, not three times.
Add a Contact field value condition in front of each reminder: if the double opt-in flag is already set, skip it. One detail is easy to miss. A Clicks Email decision listens to its own email only, and once its “no” path has run, a late click on that email will not move the contact down the “yes” path. Make sure a late click on an earlier email still counts, and test that case.
The confirmation step
The shared step is an Update Contact action. It sets the double opt-in flag to yes and writes now into the date field, so the timestamp comes from the moment of the click. Mautic also logs the click on the tracked link in the contact’s history. You end up with three records: the sign-up, the click and the field values.
Then the custom voucher action runs, followed by Send Email with the welcome email.
The newsletter segment
The weekly newsletter goes to a dynamic segment. Its filter reads the double opt-in flag (plus any interest or region filters the team needs). Mautic excludes Do Not Contact entries at send time on its own. A person enters the segment when the flag turns yes, and nobody maintains the list by hand.
How many reminders, and when?
The number and timing of reminders is a design choice. The client chose up to two, the same as in Marketo.
Some guidance we give teams:
- Send the confirmation immediately. The person is still on your page, waiting for it.
- Space the reminders by days, not hours. People miss confirmation emails because they land in a spam folder, a shared inbox or a busy week. A reminder an hour later hits the same problem.
- Make each reminder short. Repeat the one button. Do not add offers. In German practice the confirmation and its reminders should only ask for confirmation, with no advertising content.
- Ask legal how many reminders they accept. Reminders go to an address that has not confirmed yet. Some German data protection advisors prefer one reminder, some accept two.
- Vary the subject lines. The same subject three times looks like a loop.
Where do the confirmation page and preference center live?
On the client’s own domain. In this project newsletter sign-up, account preferences and thank-you pages run on the client’s subdomain, as they did with Marketo. The Mautic admin panel sits on a separate subdomain.
Subscribers see one brand from form to inbox. Links in the confirmation email match the sender domain, which helps trust and deliverability. The admin panel stays off the public marketing domain.
Mautic landing pages cover the confirmation page and the preference center. A landing page marked as a preference center lets a contact manage segments and channels instead of unsubscribing from everything. For a B2B newsletter with several interest areas, that often keeps a contact you would otherwise lose.
How do you migrate existing consent from Marketo?
Existing contacts bring their consent history with them. In this project that meant about 95,000 contacts. The three groups above define the mapping: blocking states become Do Not Contact entries with their reason, double opt-in flags and consent dates go into the same fields the new flow writes.
Two technical points decide how you load it.
The reason. Mautic’s CSV import can set Do Not Contact through a column, but it records every entry as a manual unsubscribe. That loses the difference between “this person unsubscribed” and “this address bounced”. Mautic’s contact API accepts a Do Not Contact entry with a reason and a comment, so load these states through the API.
The dates. A new Do Not Contact entry carries the date of the import, not the date of the original event. Keep the Marketo unsubscribe date in a reference field, and put it in the Do Not Contact comment if you want it visible on the entry. Load consent dates in ISO format (YYYY-MM-DD hh:mm:ss) so Mautic stores them as real dates you can filter on.
Contacts change during a migration, so plan a delta import of everyone updated after the main import. A person who unsubscribes in Marketo the day before cutover must arrive in Mautic as unsubscribed. We describe the cutover in How to plan a marketing automation migration.
The result is one place for consent data. A marketer sees the same kind of record whether the person signed up years ago in Marketo or yesterday in Mautic.
How does the voucher code get into the welcome email?
The client keeps a pool of voucher codes in its own system. Each code is single use. In Marketo a webhook fetched a code for the welcome email and mapped the response to the contact.
In Mautic we wrote a small plugin with a custom campaign action. It runs at the moment the welcome email goes out:
- Mautic asks the client’s voucher service for a code.
- The service hands over a free code and marks it as reserved.
- Mautic puts the code into the welcome email and sends it.
- When the customer uses the code in the online shop, the shop marks it as used.
Mautic never holds a list of codes. It takes exactly one code per subscriber, at sending time, from the system that owns them. The client’s team manages the pool where it always did, and redemption tracking stays in the shop.
Why a plugin?
Mautic’s “Send a Webhook” campaign action sends contact data to an external URL. It does not read a value from the response and place it into the next email. A custom campaign action closes that gap. The rest of the campaign stays standard, so the marketing team still edits emails and timings in the builder.
What to agree with the owner of the voucher system
The plugin is the small part. The design happens in the agreement with the team that owns the codes. Settle these points before anyone writes code:
- Reservation. The service marks a code as reserved the moment it hands it out. Two parallel requests must never get the same code.
- Single use. The shop, not Mautic, enforces that a code works once. Mautic only delivers it.
- Validity. If codes expire, decide whether the welcome email shows the expiry date and where that date comes from.
- No code available. The pool can run empty or the service can be down. Decide in advance what happens: does the email wait, go out without a code, or go out with different copy? There is no universal answer. Settle it with the business owner and write it down.
- Logging. Both sides should be able to answer “which contact got which code, and when”. The voucher service logs the reservation. Mautic’s campaign event log shows when the action ran for each contact.
- Access. Agree on authentication and on who rotates credentials, so a password change on one side does not silently stop welcome emails.
How do you test the flow before go-live?
A consent flow that fails quietly is worse than one that fails loudly. Test it on the test environment with real addresses you control, across at least two mail providers:
Consent
- Sign up and confirm. Check that the double opt-in flag and date appear on the contact.
- Check that the form result and the source field are filled.
- Confirm after the first reminder. Check that the second reminder does not go out.
- Click the link in the first email after reminder one has gone out. Check that the confirmation still registers.
Welcome and voucher
- Check that each welcome email carries a different voucher code.
- Check in the voucher service that the code shows as reserved after sending.
- Redeem a code in the shop’s test environment and check that it shows as used.
- Simulate an empty pool or a service outage. Check that the agreed fallback happens.
Opt-out and migration
- Unsubscribe and check that the contact gets a Do Not Contact entry.
- Spot-check migrated contacts: a confirmed subscriber, an unsubscribed one, a bounced one. Compare the reason and dates with Marketo.
- Check that the newsletter segment count matches what you expect from Marketo.
FAQ
Does Mautic have built-in double opt-in? Not as a single switch. You build it from a form, a campaign with Clicks Email decisions, and an Update Contact action that writes the flag and date. Every part is standard Mautic.
Can the confirmation email be a marketing email? Make it transactional. It asks for consent and goes to a person who has not given it yet, and in German practice it should carry no advertising.
Can I import Do Not Contact reasons with a CSV file? The CSV import records every entry as a manual unsubscribe. To keep “unsubscribed” and “bounced” apart, load these states through the Mautic API.
Can I reuse this pattern for other unique values? Yes. Any single-use value that lives in another system (a registration number, a trial license, a personal link) can be fetched by the same kind of campaign action at sending time.
For the full list of what moves from Marketo and what you rebuild, see Marketo to Mautic migration: what transfers and what you have to rebuild. For the sending side of the same project, see Mautic with Amazon SES: dedicated IP and how to plan the warm-up.
Moving a consent flow to Mautic?
This is one of the building blocks of our Marketo to Mautic migration for Meesenburg.
Tell us how your sign-up and welcome flow works today. We will show you how it maps to Mautic and what needs custom work. Talk to us about your Mautic setup.
Tags
Written by
Mautomic Team
Mautic experts sharing insights on marketing automation, custom development, and open-source technology.