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.

Add your quiz to your homepage, product pages, collection pages or a dedicated page. Where you can add the Lantern Quiz app block depends on your theme.


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.
​
When you edit a template, every page using it changes. To show the quiz only on selected products or collections pages, you have to create a separate template, then assign it to those items. Learn more in Shopify’s template guide.

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 and check the quiz in the Theme Editor preview. For the quiz to appear in your live store, save these changes in your published theme.

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.


Adjust the quiz height on mobile

These settings apply to screens up to 768px wide. You can change:

  • Auto-Height on mobile: Choose Same as desktop, On or Off.

  • Min. Height on mobile: Set the minimum quiz height on mobile.

  • Max. Height on mobile: Set the maximum quiz height on mobile.

Click Save after making your changes.
​

2. Embed it on a product page

2.1 Select Products from the page selector.
​

Choose where you want the quiz to appear:

  • On all products using the Default product template: Select Default product and go to step 2.3. Products using other templates won’t show the quiz.

  • Only on selected products: Create a separate product template in step 2.2.

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

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.


If you used Default product, you’re done. If you created a new template, assign it to each product where you want the quiz.
​

Choosing a product under Preview only changes the preview. To use the template in your store, select it in the product’s Theme template setting and save.
​

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 to open the product’s details in Shopify admin.

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.


Choose where you want the quiz to appear:

  • On all collections using the Default collection template: Select Default collection and go to step 3.3. Collections using other templates won’t show the quiz.

  • Only on selected collections: Create a separate collection template in step 3.2.

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.

If you used Default collection, you’re done. If you created a new template, assign it to each collection where you want the quiz.
​

Choosing a collection under Preview only changes the preview. To use the template in your store, select it in the collection’s Theme template setting and save.
​

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 to open the collection’s details in Shopify admin.

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?