This guide will contain instructions and useful information on adding quizzes to a Shopify, or non-Shopify page.
๐ก What you'll learn about
Ways to embed an Octane AI quiz on your page (jump to section)
How to embed a quiz using the Octane ID (jump to section)
How to embed a quiz via HTML embed code (jump to section)
Frequently asked questions (jump to section)
Different ways to present Octane AI quizzes (jump to section)
๐ก Prerequisites
The custom liquid block is only available in Online Store 2.0 themes.
Ways to embed an Octane AI quiz on your page
You can embed your quizzes directly into your pages via the following methods:
Using the Octane ID and the Shopify theme editor
This is the simplest way to add a quiz to your Shopify store. It can be done directly in the theme editor, and you can do it in two different ways:
Block Section: Add the quiz as a block section on any page, just like any other Shopify section. Simply add a new section, select the Octane AI app, and paste your Octane ID. This method allows for full customization of the published quiz.
App embed: The quiz can be embedded as an app embed, and it will be launched in full-screen mode. Youโll be able to configure which URLs should trigger the quiz.
Using the HTML embed code
You can use the HTML embed code of the quiz to add the quiz to your page's HTML code. This will allow you to embed your quiz on non-Shopify pages as well. You can also add the HTML code to a custom liquid block in your Shopify theme editor.
How to embed a quiz using the Octane ID
Getting started
First, you will need to copy the Octane ID of your quiz. You can find it in the Settings tab on the quiz editor:
This is the ID you will use to embed your quiz via App Embed or Block Section.
Now go to your Shopify admin page -> Sales channels -> Online store -> Themes -> Customize:
Embedding the quiz as a Block Section
Select the page where you want to embed the quiz in the theme editor -> go to Sections:
You can now click on Add section where you want the quiz to be added, it can be in the Header, Footer, etc. -> click on Add section -> click on the Apps tab -> select the Octane AI app:
Now, paste the Octane ID you copied from your quiz in the Octane ID field, and your quiz should appear in the page preview:
On the right side, you will find a lot of options to customize how your quiz is embedded on the page. You can toggle whether it is a page body or full-screen embed, set up a loading animation, and change the height of the quiz on mobile and desktop:
You can drag and drop the quiz app or the app block on the left to rearrange the positioning of the quiz inside the page:
Embedding the quiz via the App Embed option:
In the theme editor, click on the App Embed option -> Look for the Octane AI app and enable it:
Now, paste the Octane ID and add the paths to the pages you want to display the quiz on:
Once the customer accesses the URL to that page, they will be shown the quiz.
Keep in mind that the App Embed option only supports the full-screen quiz display, meaning it will take over the whole page when the customer opens the page. If the customer closes the quiz, they will be taken back to the home page of your store.
How to embed a quiz via HTML embed code
Octane AI quizzes can be displayed in any environment that allows for HTML embedding. An example of this is any webpage on your Shopify store, but it would not include HTML emails (emails don't allow for this type of code to run for security purposes).
In a Shopify store, there are 2 main methods you can use to display a quiz:
Adding a quiz in the theme editor
Adding a quiz inside a new page
The 1st method involves a few more steps, but gives you more control over how the quiz is displayed in the page you add it to.
Before you can add a quiz to a webpage, make sure you know where to get your quiz's embed code.
๐ก Finding the quiz embed code
Open your quiz in the quiz editor.
Go to the Publish tab on the top menu.
Click on Shopify page.
Copy the text code provided for the "Page body" embed option.
Adding a quiz in the theme editor
Adding a quiz through the theme editor is done by creating a page template, which can then be easily inserted into a new Shopify page.
๐ Creating a new page template
From the Shopify admin dashboard, go to Sales channels โ Online Store โ Themes.
On the Themes page, click on Customize to open the theme editor.
In the theme editor's top menu, click on the Home page dropdown menu.
Click on Pages โ "Create template".
Name your new page template.
๐ Adding a quiz into a custom liquid block
Inside of the page template, find the Template section on the left menu.
Click on "Add section".
Find the </> Custom Liquid section and add it to the page.
Open the custom liquid block.
Paste your quiz embed code into the "Custom Liquid" box.
Exit back out to the page template.
Use the "โฎโฎ" icon to reorder the quiz block to your desired position.
Save your page template.
Once the page template is created, you can add it to any page created for your store by selecting your quiz template.
Adding a quiz inside a new page
Quizzes can also be added into a Shopify page directly, rather than through a page template.
This method has fewer steps, but also includes these limitations:
Quizzes will be restricted to a smaller space in the page.
Custom CSS targeting the quiz will be more difficult to apply.
Removing the quiz requires deleting the code or page.
๐ Adding a quiz directly to a Shopify page
In Shopify's admin dashboard, go to Sales channels โ Online Store โ Pages.
Click on Add page.
Add a title for the page.
In the "Content" box, click on the "< >" icon to show an HTML content box instead.
Paste your quiz embed code in the HTML box.
Save your page.
Frequently asked questions
How do I link the quiz page on my website?
After your quiz page is created, that page becomes the URL for your quiz. Adding a link to the quiz page on your store's navigation menu is a great way to encourage general traffic & revenue to your quiz.
How do I remove the page title from my quiz page?
Adding a quiz as a Block Section (jump to section) is the easiest method, as it adds the quiz directly to an existing page.
This guide includes more direct methods of removing the page title from a Shopify template by editing your theme code.
What are the quiz height settings in a page embed used for?
By default, quizzes will change in size with the browser & device screen sizes. This lets the quiz fit any kind of device or screen resolution.
You can use the custom height setting if you'd like the quiz to keep to a specific size across all devices & browsers.
Can I add the quiz somewhere besides a Shopify page?
Yes, quizzes can be displayed anywhere that HTML embeds are allowed. This includes any Shopify page, but can also include non-Shopify webpages.
Quizzes cannot be added to emails, as most email clients don't allow code to run inside of emails (in order to prevent malicious code from running).
If the quiz is added to a non-Shopify page, revenue tracking will no longer function for the quiz as tracking depends on cookies added to your Shopify store by Octane AI. If you'd like to add a quiz to a non-Shopify page, but have concerns about how viable it may be, contact our support team with your questions!
Different ways to present Octane AI quizzes
Having page body and full screen embed codes allows for variations of quiz placements. While the best placement for a quiz is usually the nav bar with a simple and clear CTA like "Take our quiz", there are multiple ways to use embed code to present an Octane AI quiz.
Add quiz inside of a blog post
Page body embed code can be added to any page of the website. This means that you can just grab your code from the Publish tab of your quiz and paste it directly into the HTML content box of your blog post.
โ
Add a short one-question quiz to your collection pages
Having a simple quiz that offers just the right products with only one question answered is a super effective way to drive your customers directly to checkout. You can simply paste the embed code to the collection description filed using HTML box or using a page builder to add the quiz. This can also be achieved by editing the collection template in the theme code, but it will require coding knowledge.
Add quiz to product pages
Usually, having a quiz on product pages helps your customers to decide on the right product variant. In most cases, the quiz is added to a text button right under the variant selector.
Create quiz section on the website
Extremely popular shade finder quizzes can be built for each product category separately and used for promotions. Creating a quiz section on the website is super easy and an engaging experience for customers.
โ
Quiz Pop-up that opens on Button Click
Adding a quiz that pops up when a button is clicked is a nice touch to any page of the website. However, creating this behavior will require adding additional code. Check this guide for more details: Triggering a Quiz Pop-up on Button Click
โ