Skip to main content

MailerLite integration

Send quiz takers to MailerLite with their answers in subscriber fields, a link to their results, and groups for the store and each quiz that start your automations.

Written by Traian

With the MailerLite integration, quiz takers who leave their email and agree to email marketing are added to MailerLite as subscribers. Their answers go into subscriber fields, a link to their results is saved with them, and they join groups that start your automations: one group you pick for the whole store, and one group for each quiz.

Before you start: MailerLite's free plan works with Lantern, so you don't need a paid plan to connect it.

Step 1: Create an API token in MailerLite

1.1 Log in to MailerLite and open Integrations from the menu on the left.

1.2 Find MailerLite API and click Use.

1.3 Click Generate new token, give it a name you'll recognize, like Lantern, accept the terms and create it. Copy the token right away: MailerLite shows it only once. Leave the token open to all IP addresses, because Lantern's servers don't use a fixed address.

Step 2: Connect MailerLite in Lantern

2.1 In Lantern, open Integrations, find MailerLite under Marketing and click Connect.

Image showing the MailerLite card on Lantern's Integrations page with the Connect button.

2.2 Paste your token into API Token.

2.3 Optionally, enter a group in Group. Every quiz taker who's sent to MailerLite joins this group, whichever quiz they took. Type the group's name as it appears under Subscribers, then Groups in MailerLite, or its ID. The group has to exist in MailerLite already. Leave the field empty if you only want the groups for each quiz (see below).

Image showing the MailerLite window in Lantern with the API Token field filled in and Quiz takers entered in the Group field.

2.4 Click Connect. Lantern checks the token and the group with MailerLite, and the card shows Connected.

Image showing the MailerLite card on Lantern's Integrations page with the Connected badge and the Edit button.

That's all the setup there is. Once connected, every active quiz in your store sends quiz takers to MailerLite, with no settings to change per quiz.

What MailerLite receives

When a customer completes a quiz and leaves their email, either on the Optin Page or in the Email sign-up on the Results page, Lantern adds them to MailerLite, or updates them if they're already there, with:

  • Name and phone: MailerLite's own Name, Last name and Phone fields, when the Optin Page asks for them.

  • Answers: one field for each question with a Question Property ID (see the next section).

  • lantern_results_url: a link to their results page, so your emails can send them back to their recommendations.

  • lantern_quiz: the URL handle of the quiz they took, for example skin-care-finder.

  • Your store's group, when you entered one on the MailerLite card.

  • The quiz's own group: lantern-quiz- followed by the quiz's URL handle, for example lantern-quiz-skin-care-finder. Lantern creates this group the first time someone completes the quiz.

If the customer is already in MailerLite, for example because they took the quiz before, Lantern updates these fields and adds the groups. Their other fields and groups stay as they are.

How answers become fields

Every question can have a Question Property ID, a short name for its answer that you set in the question's right-hand panel in the quiz editor. Lantern saves each answer in the MailerLite field with the same name. You can read more about Property IDs in How to use customer answers in Lantern quizzes.

If your MailerLite account already has a field with that name, in any mix of capital and small letters, Lantern uses it. If it doesn't, Lantern creates a text field named after the Property ID, and MailerLite gives it a key in small letters, with spaces and hyphens turned into underscores: skin-type gets the key skin_type, and skinType gets skintype. You'll use that key in your emails and segments.

Choice questions don't have a Property ID by default, so give one to every question you want in MailerLite. Each answer is saved as text, up to 1,024 characters. If you made a number or date field for an answer yourself, MailerLite leaves it empty when the answer isn't a number or a date. An answer never replaces the subscriber's Name, Last name or Phone.

Starting automations

MailerLite automations start when something happens to a subscriber. Joining a group is the trigger to use with Lantern:

  • For every quiz: create an automation with the trigger When subscriber joins a group and pick the group you entered on the MailerLite card.

  • For one quiz: pick that quiz's lantern-quiz- group instead. It appears in MailerLite after the quiz's first completion, so take the quiz once yourself with your own email first, or create a group with exactly that name in MailerLite.

Inside the automation, add conditions on the answer fields to send each customer the email that fits their answers.

Marketing consent

A new subscriber in MailerLite can receive your emails right away, so Lantern only sends customers who may be emailed. A customer is sent when both of these are true:

  • Email marketing is on for the quiz. On the Optin Page, open Integration Settings on the right-hand side and check Subscribe to email marketing. It's on by default, and the section appears once MailerLite is connected.

  • The customer didn't decline marketing. If your Optin Page shows an optional consent checkbox and the customer leaves it unticked, they aren't sent.

Lantern never unsubscribes anyone from MailerLite, and someone who unsubscribed in MailerLite stays unsubscribed when they take a quiz again: MailerLite doesn't let Lantern add them back. To set up the Optin Page and its consent checkbox, see Collect customer emails.

Using quiz data in MailerLite

Once quiz takers arrive in MailerLite, you can:

  • Start an automation when someone joins your store's group or a quiz's group.

  • Add conditions to an automation on an answer field, for example to send a different email to customers with oily skin.

  • Build segments on the answer fields, for example everyone whose skin_type is oily.

  • Link back to the customer's recommendations in an email with {$lantern_results_url}.

Disconnecting and troubleshooting

To disconnect, open Integrations, click Edit on the MailerLite card and click Disconnect. Lantern stops sending customers. Your subscribers, fields and groups stay in MailerLite.

If Lantern won't save and says Invalid API token, the token was copied incompletely or was deleted in MailerLite. Generate a new one as in step 1 and paste it again.

If Lantern says there's no group with this name or ID, check the group's name under Subscribers, then Groups in MailerLite, or leave the field empty.

If customers stop arriving in MailerLite, the most likely reason is that the token no longer works, for example because it was deleted. Generate a new token, click Edit on the MailerLite card in Lantern, paste it into API Token and click Update.

Good to know

  • Sensitive answers are not shared. Answers to questions set to Don't share or Don't store are never sent to MailerLite. See How Sensitive Data Controls Work.

  • Test submissions are included. Completing the quiz in Preview with an email adds that person to MailerLite too.

  • Changing a quiz's URL handle changes its group name and its lantern_quiz value, so automations that use the old group stop getting new customers from that quiz.

  • Zapier still works. If you'd rather build your own automation, the Zapier integration can also send quiz takers to MailerLite.

Did this answer your question?