Skip to main content

Klaviyo Integration

Written by Traian
Image showing the Klaviyo logo

Integrating with Klaviyo allows you to build personalized email campaigns based on your customers’ quiz answers.
To get started, make sure you have a Klaviyo account.

This integration is completed in two steps:

  1. Connect Klaviyo to Lantern

  2. Connect Klaviyo to your quiz

Step 1: Connect Klaviyo to Lantern

  1. Open Lantern from your Shopify admin

  2. Go to the Integrations tab

  3. Click Connect on the Klaviyo card

    Image showing the Lantern app Integrations tab with the Klaviyo card and the Connect button indicated by an arrow.
  4. In the popup, click Connect Klaviyo

    Image showing the Connect Klaviyo popup with the Connect Klaviyo button indicated by an arrow.
  5. You will be redirected to Klaviyo

  6. Log in and click Allow to grant permissions

    Image showing the Klaviyo permissions screen with the Allow button indicated by an arrow to grant access to Lantern.

Once completed, you'll be redirected to the Lantern Integrations page, where Klaviyo should now show up as Connected.

Image showing the Lantern app Integrations page with the Klaviyo card displaying a Connected status.

Note: If you previously connected Klaviyo using API keys, you may see an option to upgrade to the new connection. We recommend switching to the new connection to ensure the integration continues to work as expected.

Step 2: Connect Klaviyo to your quiz

Once Klaviyo is connected, every quiz creates or updates a Klaviyo profile for each customer who leaves an email or phone number. Connect a quiz to a Klaviyo list if you also want those customers added to that list.

A List ID is optional. Customers are only added to a list, and subscribed, when the quiz has a List ID. Each profile's subscribed status depends on the customer's marketing consent and on whether the list is single or double opt-in. Learn more in Marketing Consent and Klaviyo Integration.

In Klaviyo

If you don't want customers added to a Klaviyo list, skip these steps and leave the List ID empty in Lantern.

  1. In Klaviyo, go to Audience → Lists & Segments

  2. Click Create and select List

    Image showing the Klaviyo dashboard under Audience, Lists & Segments, with the Create menu expanded and the List option indicated by an arrow.
  3. Name your list and click Create List

    Image showing the Klaviyo Create List screen with the list name field filled and the Create List button indicated by an arrow.
  4. Open your list and go to Settings

  5. Copy the List ID

    Image showing the Klaviyo list settings page with the List ID indicated by an arrow for copying.

In Lantern

  1. Open the quiz and go to More Integrations → Email marketing.

  2. Find the Klaviyo card and click Activate.

Image showing Lantern quiz editor on the “More Integrations” step, with Klaviyo listed and “Activate” button highlighted

  1. Paste the List ID if you want to use a list.

4. Click Save. The change takes effect without republishing.

Image of Lantern Klaviyo integration settings showing a “List ID” field populated with Up8FAc and a Save button to confirm.

What Lantern sends to Klaviyo

Quiz completion event

Lantern sends a quiz-specific event named Completed Lantern Quiz (v2) - [quiz URL handle]. It contains the eligible quiz answers and recommended products for that submission. Use this event to trigger a results email or build a segment of people who completed a specific quiz.

Klaviyo profile page with the activity feed showing two highlighted “Completed Lantern Quiz (v2)” events listing products, answers and session details, plus custom properties

If the shopper gives their email through Email Sign-up on the Results Page, Lantern creates or updates their profile and sends the event when they sign up. Any flow triggered by the event starts at that point.

Products from a named content block appear separately in the event as products_by_block.<block name>. To use these products as the row collection for a dynamic table in a Klaviyo email, enter a name in the block’s Block name (optional) field and republish the quiz. Dynamic Content Block Variants in Klaviyo

Profile properties

Open a Klaviyo profile and look under Custom Properties to find saved quiz data, such as answers and recommended product details. Klaviyo lists these properties alphabetically. That display order doesn’t change the order of answers or recommendations the shopper saw.

Klaviyo profile page with the Custom properties section highlighted, listing quiz data such as $source Lantern and Answer (1) to Answer (7) values

Choose which profile properties to save

All five Profile properties groups are checked by default. To change which groups a quiz saves:

  1. Open the quiz and go to More Integrations → Email marketing → Klaviyo.

  2. Click Activate if the Klaviyo card isn’t already open.

  3. Under Profile properties, untick the groups you don’t need.

  4. Click Save.
    ​

    Lantern's Integrations page with Klaviyo Connected, showing List ID (optional), Source (optional) and Profile properties checkboxes, plus Deactivate and Save buttons

Checkbox

What it saves

Optin Page fields

first_name, last_name, email, phone_number and MARKETING_CONSENT from the Optin Page.

Answers with a Property ID

Answers from questions with a Property ID or Klaviyo ID, saved under that identifier. For example, a question with the ID skin_type saves its answer under skin_type.

Numbered questions and answers

Question (1), Answer (1), Question (2), Answer (2) and so on, plus Total Questions.

Recommended products

ProductName, ProductID, VariantID, Price, Price Currency, Price Amount, Url, ImageUrl, Score and Flow, numbered for each product, such as ProductName (1). It also saves AllProducts, which lists product IDs.

Content block results

winner_variants and winner_scores for the content block variants the shopper saw.

Changes apply to future submissions. Properties already saved on existing profiles stay there. The checkboxes affect profile properties only. The quiz completion event continues to include eligible answers and recommended products.

Before unticking a group, check whether your segments, flows or email templates use its properties. For example, a segment that relies on ProductName (1) will stop matching new contacts based on that property if the quiz stops saving it.

Give each quiz its own Source

Set a custom Source to distinguish subscribers from different quizzes on the same Klaviyo list.

  1. Open the quiz and go to More Integrations.

  2. On the Klaviyo card, find Source (optional) below List ID and enter a name, such as Coffee finder quiz.

  3. Click Save. The change takes effect without republishing.

The Klaviyo card in the quiz editor's More Integrations step, with the Source (optional) field highlighted below List ID and showing Coffee finder quiz, and the Save button at the bottom of the card.

Lantern sets Source when the quiz subscribes someone to the list after you save. A blank field keeps the default Source, Lantern. Shoppers who decline marketing won’t receive the quiz’s Source, and a later sign-up through a Klaviyo form can replace it.

To segment everyone who completed a specific quiz, use its Completed Lantern Quiz (v2) - [quiz URL handle] event. This works regardless of the Source on the profile. Set up Klaviyo Segments

Did this answer your question?