Skip to main content

Klaviyo Integration

Stefania avatar
Written by Stefania
Updated over a week ago

Image showing the Klaviyo logo

Integrating with Klaviyo will allow you to build personalized email campaigns based on what answers your customers have selected in a quiz.

This integration needs to be done in two places:

  1. The Lantern App itself

  2. The quiz you want to collect emails from

Alright, let's get started!

Step 1: Integration with Lantern

To get started, make sure you have a Klaviyo account.

  1. Log in to Klaviyo

  2. Click on your profile icon on the bottom left

    Image of Klaviyo dashboard highlighting the profile icon in the bottom-left corner.


  3. This should open a menu full of options to select from!
    Click on the Settings button in the list of options

    Image of expanded Klaviyo profile menu showing the 'Settings' option.


  4. Then click on the API Keys tab to open the list of API keys associated with your Klaviyo account.

    Image of Klaviyo settings page with the 'API Keys' tab selected.

  5. Copy both the Public API Key, and a Private API Key. The private API Key can be unhidden with the eye icon next to it.

    Image showing the list of existing API keys in Klaviyo, including options to create new keys.

    Please note: You can create a separate private API key specifically for your customers that complete the quiz. To do this, click the Create Private API Key button seen in the image above.


    Please make sure this is set up as a full access API key.

    Image of a button to create a new private API key in Klaviyo and the option to set up a full access API key.

  6. Open Lantern from your Shopify store admin.
    Go to the More Integrations tab, and click on the "Connect" button on the Klaviyo entry.

    Image showing a ‘Connect’ button for Klaviyo inside the More Integrations tab of Lantern app.

  7. Enter the Public and Private API Key from step 4, and click Connect.
    You should get a success message on the bottom of your screen!

    Image of Lantern integration settings showing fields to enter Klaviyo Public and Private API keys.

Step 2: Integration with your Quiz

You have now connected the app with Klaviyo. The next step is to connect Klaviyo to your quiz now!

To make sure you are collecting data properly, make sure to follow these steps for each quiz you'd like to collect emails from!

  1. Click on Lists & Segments on the left side of Klaviyo, under the Audience group.

    Image of Klaviyo dashboard with 'Lists & Segments' section highlighted.

    ​​

  2. Click on the Create List/Segment button on the top right of the screen.

    Image of Klaviyo interface showing the 'Create List/Segment' button.

  3. Choose to create a List

    Image of Klaviyo prompt asking “Do you want to create a list or a segment?” with the “List” option box highlighted
  4. Choose a name for your list, in this example we used "Siesta Sloth" as our list name.

    Image of Klaviyo “Create List” screen with an example list name entered (“Siesta Sloth” in the Name field)

  5. Click on the "Create List" button on the bottom right of the page.

    Image showing the bottom of the Klaviyo Create List form, showing the “Create List »” button (next to a Cancel button)

  6. Head over to the settings tab of your new list, and copy the List ID.

    Image of Klaviyo list settings page for “Siesta Sloth,” displaying “This list’s ID is Vaggvj” under List ID & Name (emphasizing the ID Vaggvj, not the list name)


    Please note the list ID in this example is Vaggvj (NOT Siesta Sloth!).

  7. In Lantern, edit the Quiz of your choice and head over to the More Integrations step by clicking on it on the top of the page.
    Then click on the green Activate button for Klaviyo.

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

  8. Paste the Klaviyo List ID from step 6 in the List ID field. Then hit the Save button!

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

Make sure the Quiz contains an Optin Page.
To add an Email or Phone capture step to the quiz, click on the +Add Page inside the Quiz Builder, then select Optin Page and click Add Page.

Image of Lantern quiz builder interface illustrating how to add an Optin Page – “Optin Page” selected as the page type and an example email capture page.

That's it! Customers who enter their email address in your quiz flow will now show up in Klaviyo, and you will be able to create segments based on their flow answers.

9. You are now ready to create audience segments in Klaviyo using the data obtained from the quizzes.

Once you have integrated the app, each person who completes the quiz and enters their email will be added to your designated list in Klaviyo. Their profile will have an Activity Log section on the right hand side of the screen, that shows a "Completed Lantern Quiz (v2)" event with their answers and recommended products.

Image showing Klaviyo profile page (user detail view) with the Activity Log on the right showing “Completed Lantern Quiz (v2)” events (highlighted in yellow) containing quiz results data

To the left of the Activity Log , you will find Custom Properties which is a detailed list of all information synched from the quiz such as Questions and their Answers, Product Results with Price, Currency, Product ID, Product Name, and Product URL.

This more granular information that will help you write personalized e-mail recommendations through Klaviyo Email Flows.

Image showing Klaviyo profile page with the “Custom properties” panel (highlighted) listing detailed quiz data such as Source (Lantern), quiz question answers, recommended products, etc.

Please note that data coming in from the quiz completions inside Klaviyo is organized in alphabetical order, which is why Answers are at the top of the list and Questions at the bottom.

In case you need step by step instructions on how to create segments in Klaviyo, that is documented in this help article.

Image with a text and link to a help article about how to send customize klaviyo email designs

Did this answer your question?