Skip to main content

EMBED the quiz anywhere in your store

Written by Ana Bunaiasu

If you prefer, you can check out this information in video format.

Copy the quiz embed key

Before you can embed your quiz, you'll need to copy its Quiz Key.

Go to the Publish page in Lantern, scroll to Option 4 and click Copy Key.

Image showing the Lantern Publish page with Option 4 visible and the Copy Key button highlighted for embedding the quiz.

Embedding the quiz as a block in your Theme Editor

Once you've copied the key, click Go to the Theme Editor. After you’re redirected to your editor, use the drop-down menu at the top to choose where you'd like to display your quiz.

1. Embed it on the Homepage of your store

1.1 Select Homepage from the page selector.

1.2 Add the Lantern Quiz app block to the section where you want the quiz to appear.

Image showing the Shopify Theme Editor with the option to add the Lantern Quiz as a block to a homepage section.

1.3 Paste your Quiz Key into the Quiz Sub-URL field.

1.4 Save your changes. Your quiz will appear immediately.

Image showing the Theme Editor sidebar where the copied Quiz Key has already been pasted into the Quiz Sub-URL input field, with the quiz visible and highlighted on the live preview, and the Save button also highlighted.

By default, Auto Height is enabled. This automatically adjusts the height of the quiz to fit each question to avoid scroll bars. You can also adjust the width, margins or choose a fixed height if needed.

Image showing customization settings for the embedded Lantern block, including Auto Height toggle, width, and margin adjustments.

2. Embed it on a product page

2.1 Select Products from the page selector.

Important note: If you want the quiz to appear on all product pages, add the Lantern Quiz block to the Default product template.

Image showing the Theme Editor with the Products option selected from the dropdown for embedding the quiz on product pages.

If you only want the quiz on certain products, you'll first need to create a custom product template.

2.2 Click Create template, give it a name such as Quiz Products, then create it.

Image showing the Create template dialog that appears after clicking the 'Create template' option from the dropdown menu. The dialog includes the input field where 'Quiz Products' is entered as the template name, and the Create template button is highlighted.

2.3 Add the Lantern Quiz app block, paste your Quiz Key into the Quiz Sub-URL field and save.

Image showing an embedded Lantern quiz block on a Shopify product page template with the Quiz Key already pasted in the Quiz Sub-URL input field. The quiz is visible and highlighted in the live preview.

For any new product template, you can choose which products this assigned to.

To assign products to the new template:

2.4 Under Preview, click the displayed product.
2.5 Open the All tab.

Image showing the Shopify Theme Editor with the product preview selector opened, the All tab highlighted, and a list of products available to assign to the custom product template.

2.6 Find the product you want.

2.7 Click the pencil icon.

2.8 Choose your new template from the Theme template dropdown.

2.9 Click Save.

Image showing the product details panel opened from the pencil icon in the Shopify Theme Editor, with the custom product template selected from the Theme template dropdown and the Save button highlighted.

Once assigned, the product will use that template in your store.

Image showing the Shopify Theme Editor confirming the newly assigned product using the custom template.

3. Embed it on a collection page

The process for collection pages is almost identical.

3.1 Select Collections from the page selector.

Important note: If you want the quiz on all collections, use the Default collection template.

If you only want it on selected collections, create a new collection template by clicking Create template.

Image showing the Theme Editor dropdown with Collections selected to embed the quiz on collection pages.

3.2 Click Create template, give it a name such as Quiz Collection, then create it.

Image showing the Create template popup to create a custom template for collection pages named "Quiz Collection" with the 'Create template' button highlighted.

3.3 Add the Lantern Quiz app block, paste your Quiz Key into the Quiz Sub-URL field and save.

Image showing a collection page template with the Lantern quiz embedded. The Quiz Key has been pasted into the Quiz Sub-URL field, the quiz is already visible and highlighted in the preview area, and an arrow points to the Save button to confirm the setup.

To assign collections to the template:

3.4 Under Preview, click the displayed collection.
3.5 Open the All tab.

Image showing the Shopify Theme Editor with the Collection preview selector opened, the All tab highlighted, and a list of collections available to assign to the custom collection template.

3.6 Find the collection you want.

3.7 Click the pencil icon.

3.8 Select your new template from the Theme template dropdown.

3.9 Click Save.

Image showing the collection details panel opened from the pencil icon in the Shopify Theme Editor, with the custom collection template selected from the Theme template dropdown and the Save button highlighted.

Once assigned, the collection will use that template in your store.

Image showing the Shopify Theme Editor confirming a collection has been assigned to the new template.

4. Embed it on a dedicated store page

You can also create a page that's dedicated entirely to your quiz.

4.1 Go to Online Store → Pages and create a new page. It can be left empty for now.

Image showing the creation of a new Shopify Page named "Quiz Page" under Online Store > Pages.

In this example, we're not only creating this page but adding it as a navigation menu element in the Header for easy access.

4.2 Go to Content → Menus → Main menu

Image showing the Main Menu highlighted in Shopify Admin with a list of existing navigation items such as Home, Catalog and Contact.

4.3 Click Add menu item, give it a name such as Quiz Page

4.4 Link it to the page you just created and save.

Image showing the Add Menu Item section with a new label "Quiz Page" and link to the newly created quiz page with the Save button highlighted.

4.5 Return to the Theme Editor and create a new Page template.

Image showing the Create template popup that appears after selecting 'Create template' from the Pages dropdown. The template is named 'Quiz Page' and the Create template button is highlighted.

4.6 Assign your new page to this template so any changes only apply to this page.

Image showing Shopify Admin's page editor with the newly created template assigned to the quiz page.

4.7 By default, Shopify displays the page title at the top. You can hide this in the Theme Editor.

Image showing how to use Shopify's Theme Editor to hide the page title from appearing at the top of the quiz page.

4.8 You can also add other sections around the quiz, such as featured collections, promotional content or banners, giving you complete control over the page while keeping the quiz as the main focus.

Image showing the Theme Editor with the 'quiz-page' selected from the dropdown menu. The embedded Lantern quiz is clearly visible, accompanied by additional sections such as a product collection list to enhance the page layout.

Did this answer your question?