Lantern allows dynamic content block variants to be sent to Klaviyo upon quiz completion. This feature helps you personalize your emails dynamically, based on the relevant variant that was displayed to your customers on the quiz results page.
How It Works
Each variant created within a dynamic content block in Lantern has a unique Variant ID and an optional Variant Nice Name. When a quiz is completed, Lantern sends the IDs or Nice Names of the winning content block variants to Klaviyo as part of the Completed Lantern Quiz (v2) - your-quiz-handle event. Each quiz sends its own event, named with that quiz's URL handle.
If the Variant Nice Name field is left blank, the Variant ID will be sent to Klaviyo by default. If a Nice Name is provided, it will be sent to Klaviyo instead of the Variant ID.
Key Data Sent to Klaviyo:
Lantern sends quiz completion data to Klaviyo that includes information about which dynamic content block variants were shown. This is represented in the event data under winner_variants, together with winner_scores, which holds each block's winning variant score (the same number shown in place of [score] on the results page). Both are sent on the event and saved on the Klaviyo profile. The event always includes them. To turn off the profile copy, use the Content block results checkbox under Profile properties on the quiz's Klaviyo card. Find out more in Klaviyo Integration.
If a Variant Nice Name isn’t provided, the winner_variants array will contain Variant IDs instead.
This allows you to:
Personalize email content based on the variant displayed on the results page.
Automate email flows tailored to distinct customer preferences.
Show one block's products in an email
When a results content block has a name, the Klaviyo quiz event also carries that block's own products, in the order and count the results page shows them. This lets an email show only the products of one block, for example the main recommendation without a bundle block, which the single products list can't do. These products are sent on the Klaviyo event only, not to the profile or other integrations.
To use them:
In the content block window, enter a name in the Block name (optional) field. Use letters, numbers and underscores.
Publish the quiz. A new name reaches emails after publishing.
In Klaviyo, add a dynamic table block and set its row collection to the value below, replacing
your_block_namewith your block's name.
event.products_by_block.your_block_name
If a named block wasn't shown on the results page, it sends an empty list.
Setting Up Dynamic Content in Klaviyo
In our example, we'll use a pet food quiz tailored with 6 dynamic content block variants, focusing on different life stages of pets: three variants for dogs (puppy, adult, senior) and three for cats (kitten, adult cat, senior cat). Here’s how we can customize the content of our Klaviyo email based on which variant was displayed on the results page:
1. Using Klaviyo's Display Logic with Sections
Utilize Klaviyo's built-in show/hide logic to tailor content in emails based on the Variant Nice Name.
Steps to Implement:
1.1. In the Klaviyo email editor, create a separate section of content for each content block variant, such as one for puppies, another for adult dogs, etc. You can include any type of content you want inside a section such as images, buttons, dividers etc, but in our example, we’ll only add text.
1.2. For each section, navigate to Display settings and under Show/hide logic, click the Use code option to input custom display conditions.
1.3. Enter the condition to check if the Variant Nice Name is in the winner's array.
"Variant Nice Name" in event.winner_variants
This logic ensures that the section only displays if the quiz results page shows the correct variant.
In our example, for the puppy diet section, our condition will be:
You can copy the correct Variant Nice Name from inside your content block.
1.4. Repeat this process for each section.
Example:
If a quiz participant's results indicate they have a puppy, the puppy variant will be included in the winner_variants array sent to Klaviyo. In the email template, the section with puppy-specific content will only display if this variant name is found in the array, meaning quiz rakers will only see this section if it is shown to them on their results page.
2. Using Flow Triggers and Filters
Create distinct flows for different pet types using Klaviyo's Flow Builder.
Steps to Implement
2.1. Create a New Flow: In Klaviyo, initiate a new flow triggered by the "Completed Lantern Quiz (v2) - your-quiz-handle" event. Each quiz sends its own event, so pick the one for your quiz.
2.2. Set Up Trigger Use Trigger Filters to segment the flows based on specific content block variant IDs. To do this click the Add button next to the Trigger filters option.
2.3. On the next screen, click Add Trigger filter.
2.4. Enter the correct filter based on the variant ID by following these steps:
2.4.1. Select the dimention winner_variants
2.4.2. Set the rule as contains
2.4.3 Select the correct 'Variant Nice Name' from the drop-down. In our case, this will be the puppy variant
Please note: to have all available Variant Nice Names in this drop-down, you must first complete the quiz and make sure each variant was presented as a result. This is the only way the information will be sent to Klaviyo, and the ‘Variant Nice Name’ will be present in the drop-down.
2.5. Save your trigger filter then Save your new flow
2.6. Customize Email Templates: Develop customized email templates for each variant. For the puppy variant, the email content might focus on puppy nutrition, training tips, and suitable products for puppies.
In our case, there are six distinct variants (three for dogs and three for cats), and we will need to set up six separate flows. So this solution is suitable if you have a relatively small number of variants.
Example for Implementing Puppy Flow:
Flow Name: Puppy Food Recommendations
Trigger Condition: winner_variants contains ‘Variant Nice Name’ for PUPPY
Email Content: Include tips, and product recommendations specifically beneficial for puppy care and development.
Common Questions
Q: What happens if I don’t add a Variant Nice Name?
The Variant ID will be sent to Klaviyo instead.
Q: Can the full content of the winning dynamic content block be sent to Klaviyo?
No, due to API payload limitations and HTML formatting challenges, only the variant information (Variant Nice Name or Variant ID, depending on which is available) is sent.
Q: What if multiple content blocks are used in a quiz?
All winning Variant Nice Names are included in the array, enabling personalized content based on multiple quiz results.
Only blocks shown on the shopper's results page are included. A hidden block, or a block where no variant matched, sends nothing.
A variant with Include product recommendations unticked is still listed in
winner_variantsbut sends no products.
Q: Can multiple emails be triggered based on quiz results?
Yes, different flows can be set up using trigger filters based on specific Variant Nice Names to cater to diverse customer needs.
Q: In what order are recommended products sent to Klaviyo?
Recommended products are sent with the main recommendations first (in Results page order), followed by the products of each Dynamic Content Block in the order the blocks appear on the page.
To use one block's products on their own, give the block a Block name and use
products_by_block.To add recommended products to an email, see Send product recommendations with Klaviyo emails.
To learn how products and blocks are arranged on the Results Page, see Set-up your Results Page and Personalize your Results Page with Dynamic Content Blocks.
By using Variant Nice Names, you can personalize your Klaviyo emails with clear, descriptive targeting that aligns with each quiz result.













