Skip to main content

EMBED the quiz anywhere in your store

Ana Bunaiasu avatar
Written by Ana Bunaiasu
Updated over 2 months ago

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

Copy the quiz embed key

To start embedding your quiz anywhere in your store, you need to copy the quiz key. To do so, click the Copy Key under Option 4 on the Publish page. You'll use this key inside the Theme Editor to insert the quiz.

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, go to Theme Editor. You can choose which page you want to embed the quiz on from the drop-down menu at the top of the page.

1. Embed it on the Homepage of your store

Once you select the Homepage from the drop-down menu at the top of the page, scroll through the elements of the page and add the Lantern Quiz block on any section where you want to display the quiz as an embedded element.

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

After you add the app as a block, on the right-hand side menu, you'll need to paste the Quiz Key in the Quiz Sub-URL input box. Once you save, the quiz is visible 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.

The automatically enabled Auto Height option ensures that each page adjusts its height depending on the content of that particular question to avoid scroll bars; however, you can still customize specific elements such as margins, width or set a specific height.

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

2. Embed it on a product page

From the top drown-down menu, you can choose the Products option. If you want to show the quiz on all product pages, you can select the Default product option, but if you only want to show it on dedicated product pages, you need a custom template that will be used by those products only.

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

If you don’t already have a dedicated template for it you need to create that first. To create a product template click on Create template and name your new template such as “Quiz Products”.

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.

Now similarly to what you did for the homepage, you will add the app as a block, on the right-hand side menu, you'll need to paste the Quiz Key in the Quiz Sub-URL input box. Once you save, the quiz is visible immediately.

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 page, you can choose which products it is assigned to. To do this, you need to click on Change under Preview from the left-hand menu in the Theme Editor. This will open a Select Product menu on the right-hand side.

Image showing the Preview section in Shopify Theme Editor with the change option highlighted and clicked to assign specific products to a custom template.

By default, All will be selected, but you can switch to Assigned and in order to assign specific products you will click on the Product links and be redirected to the Product list on your Shopify admin. Go on the product listings you want to switch to this template and set them to use this new template, then click Save to apply.

Image showing a 3-part screen sequence: first, the Theme Editor where the 'Assigned' tab and 'Products' link are highlighted and clicked; second, the Shopify Admin product list where a product is selected and clicked; third, the product details page where the template dropdown at the bottom right shows 'Quiz Products' selected and highlighted. Arrows visually connect each step.

Once that is done you can visit the template page in the Theme editor and see how the newly edited product is now assigned to this template.

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

3. Embed it on a collection page

From the top drown-down menu, you can choose the Collections option. If you want to show the quiz on all product pages, you can select the Default product option, but if you only want to show it on dedicated product pages, you need a custom template that will be used by those products only.

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

If you don’t already have a dedicated template for it, you need to create one first. To create a collection page template, click on Create template and name your new template, such as “Quiz Collection”

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

Similar to what you did for the homepage and product page, you will add the app as a block on the right-hand menu. You'll need to paste the Quiz Key in the Quiz Sub-URL input box. Once you save, the quiz is visible immediately.

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.

For any new Collection Template page, you can choose which collections it is assigned to. To do this, you need to click on Change under Preview from the left-hand menu in the Theme Editor. This will open a Select Collection menu on the right-hand side.

Image showing the Quiz-collection template opened in Theme Editor. The Preview section is highlighted, and the Change option is clicked to open the Select Collection panel on the right side. The All tab under this panel is also highlighted.

By default, All will be selected, but you can switch to Assigned and in order to assign specific collections. You will click on the Collection links to be redirected to the Collections list on your Shopify admin.

Image showing two parts: first, the Select Collection panel with the 'Assigned' tab selected and the 'Collections' link clicked and highlighted; second, the Shopify Admin’s collection list where 'Happy Puppy Meals' is selected and highlighted. Arrows guide through each screen.

Click on the Collection you want to switch to this template and set it to use this new template then click Save to apply.

Image showing the Happy Puppy Meals collection editor in Shopify Admin. The Theme template dropdown is open and the "quiz-collection" template is selected and highlighted, with the Save button also highlighted.

Once that is done you can visit the template page in the Theme editor and see how the newly edited collection is now assigned to this template.

Image showing the Shopify Theme Editor confirming a collection has been assigned to the new template with the Lantern quiz visible and embedded below.

4. Embed it on a dedicated store page

Using the same method to embed the quiz as a block, you can also create a dedicated page for it. You can then customize this quiz page from the Theme Editor, the same as you would any other page in your store.

To start, go to Online Store -> Pages and create a dedicated quiz page that you can leave empty.

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.

From your Shopify Admin, head over to Content → Menus →Main menu. Here you will find a list of all the pages in your Main menu, such as the Homepage, Catalog, and Contact page.

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

There you will need to Add menu item, give it a name, in our example we used Quiz Page, and include the URL link to the page we have previously created with the same name.

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.

For the customization to work using the theme editor you will need to also create a Page Template from the Theme Editor that you will use for your dedicated Quiz Page.

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.

You will use the same process to assign your page to this template such that these changes are only applied to it when edited from the Theme Editor.

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

It's important to make sure to hide the title of the page that by default, is at the top of any new one we create. In order to do so we can use the Theme Editor and Hide the page's title.

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

We can use the Theme Editor to add a few other sections that complement the quiz block, while keeping the focus point on it. For example we can add a list of most popular product collections after the quiz. With this method you can fully customize pages with any other elements on top of your quiz for a truly personalized seamless experience for your customers.

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?