How to Set Up Automatic Popups¶
Automatic popups can significantly enhance user engagement by presenting timely content or interactive elements like quizzes.
This guide walks you through setting up automatic popups on your eCommerce store, including popups that appear based on time spent on a page, across all pages, on the homepage, with exit intent, and options for showing popups multiple times per session.
Before You Start:
- Ensure you have administrative access to your eCommerce store.
- A quiz created with the RevenueHunt app.
- (optional) Basic understanding of HTML for editing themes.
- (optional) Access to your eCommerce theme's code editor.
Warning
Directly editing your Shopify or other eCommerce theme's source code can potentially disrupt your store's functionality. If unsure about some steps, consider hiring a developer.
Setting Up Automatic Popups¶
Warning
Automatic popups can be very intrusive which is why, by default, they are shown only once per customer session.
On the Main Page¶
Option 1: Through Shopify Theme¶
- Copy Quiz ID: Go to your RevenueHunt app dashboard, select a quiz and click the
...
button. Copy your Quiz ID. - Open Store Themes: Go to
Online Store > Themes
, clickCustomize
, then openApp Embeds
. - Embed Popup Quiz: Select
Automatic Popup Quiz
, enter the Quiz ID, adjust settings, and activate the toggle. - Save Changes: Ensure all changes are saved before exiting the theme editor.
Option 2: Manual¶
- Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode, andShow Instructions for Legacy Themes
. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. - Open Store Themes: In
Themes
, clickCustomize
, add aCustom content
section, then aCustom HTML
/Custom liquid
block. - Paste Popup Code: In the HTML/custom liquid block, paste your popup code.
- Save Changes: Ensure all changes are saved before exiting the theme editor.
- Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. Copy the HTML code. - In WordPress, open
Pages
and find the Front Page. ClickEdit
to open the page. - In the editor, find a
Custom HTML
element and add it to the page. - In the element, paste the code copied from the app.
- Save the changes and
update
the page. - From now on, the automatic popup quiz will be visible on the main page.
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. Copy the HTML code. - In your Magento dashboard go to
Content
>Blocks
. ClickAdd New Block
. - Edit the Block Title, Identifier and Store View and click
Edit with Page Builder
. - Select
Elements
>Rows
and drag a row into the canvas. - Next open
Elements
and pickHTML Code
. Drag theHTML Code
onto the Row. - Click the gear icon to open
HTML settings
. - Under
Enter HTML, CSS or JavaScript code
paste the HTML code copied from the app. - Remember to save the changes.
- From now on, the automatic popup quiz will be visible on the main page.
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. Copy the HTML code. - In BigCommerce, go to
Storefront
>Web Pages
. Find the main page. - Switch to the
HTML
editor. Paste the HTML code copied from the app. - Save the changes.
- From now on, the automatic popup will be visible on the main page.
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. Copy the HTML code. - In your store customization options find the main page.
- Find a
Custom HTML
element. In the element settings paste the code copied from the app. - Save the changes.
- From now on, the automatic popup quiz will be visible on the main page.
On a Specific Page¶
- Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode, andShow Instructions for Legacy Themes
. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. - Embed Code on Page: In Shopify, go to
Online Store > Pages
, select the page, clickShow HTML
, and paste the popup code. - Save Changes: Ensure all changes are saved before exiting the theme editor.
- Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. Copy the HTML code. - In WordPress, open
Pages
and find the page where you want the popup to show. ClickEdit
to open the page. - In the editor, find a
Custom HTML
element and add it to the page. - In the element, paste the code copied from the app.
- Save the changes and
update
the page. - From now on, the automatic popup quiz will be visible on that page.
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. Copy the HTML code. - In your Magento dashbaord go to
Content
>Pages
. ClickAdd New Page
or open an existing page. - Edit the Page and open the
Content
tab. ClickEdit with Page Builder
. - Select
Elements
>Rows
and drag a row into the canvas. - Next open
Elements
and pickHTML Code
. Drag theHTML Code
onto the Row. - Click the gear icon to open
HTML settings
. - Under
Enter HTML, CSS or JavaScript code
paste the HTML code copied from the app. - Remember to save the changes.
- From now on, the automatic popup quiz will be visible on that page.
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. Copy the HTML code. - In BigCommerce, go to
Storefront
>Web Pages
. ClickCreate a Web Page
or pen an existing page. - Under
Web Page Details
>Page Content
switch to theHTML
editor. Paste the HTML code copied from the app. - Save the changes.
- From now on, the automatic popup quiz will be visible on that page.
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. Copy the HTML code. - In your store customization options find the page you want the quiz to show on.
- Find a
Custom HTML
element. In the element settings paste the code copied from the app. - Save the changes.
- From now on, the automatic popup quiz will be visible on that page.
Across All Pages¶
- Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode, andShow Instructions for Legacy Themes
. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. - Edit Theme's Source Code: Navigate to
Online Store > Themes
, clickActions > Edit Code
to access the theme editor. - Locate and Edit File: Find the
</body>
tag intheme.liquid
orfooter.liquid
. Paste the popup code just before this tag. - Save Changes: Ensure all changes are saved before exiting the theme editor.
- Install a Popup Plugin: First, you'll need a plugin that can create and manage popups. Popular options include 'Popup Maker' or 'Elementor' if you're looking for something with more design flexibility. Install and activate your chosen plugin through the WordPress dashboard.
- Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode, andShow Instructions for Legacy Themes
. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. - Create a New Popup: Navigate to the popup plugin's section in your WordPress dashboard. Select the option to create a new popup. Name your popup and start designing it. Most popup plugins offer a visual editor to customize the look and layout.
- Embed the Quiz: In the popup editor, add a
custom HTML
block and paste the code copied from the app. - Set Popup Conditions: Configure when and where the popup should appear on your site.
- Publish and Test: After configuring your popup, publish it. Then, visit your site to ensure the popup appears as expected and that the quiz functions properly within the popup.
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Find and Install a Popup Extension: Search the Magento Marketplace for a popup extension that fits your needs. Extensions like "Magento 2 Popup Extension" by Mageplaza or similar can be used. Download and install the extension via Composer or by uploading it to your server.
- Configure the Extension: Once installed, navigate to the backend of your Magento store. Go to the extension settings via the admin panel. Here you can create a new popup and configure its settings.
- Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode, andShow Instructions for Legacy Themes
. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. - Embed the Quiz: In the popup configuration, insert the HTML or JavaScript code for your quiz. This could will be the code generated from your "Product Recommendation Quiz".
- Set Display Rules: Configure the extension to show the popup on all pages. You might also set additional conditions like display timing, animation effects, and user interaction triggers (e.g., exit intent, time on site).
- Save and Test: After setting up everything, save your changes and test the popup on your live site to ensure it works correctly across different pages and devices.
Using Script Manager
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Access the Script Manager: Log into your BigCommerce admin dashboard. Navigate to
Storefront
>Script Manager
. - Create a New Script: Click on
Create a Script
. Fill in the details: - Name: Give your script a name, e.g., "Product Recommendation Quiz".
- Location on Page: Choose Footer to ensure the script loads at the end of the page, which is typical for popups.
- Select Pages where script will be added: Choose All Pages to ensure the popup appears throughout your site.
- Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode, andShow Instructions for Legacy Themes
. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. - Insert the Popup Code: In the Script Content area, paste the HTML code for your popup. This will include the quiz code from your quiz builder.
- Save and Test: Save your script settings. Visit your store’s front end in an incognito window to ensure the popup appears correctly on all pages.
Modifying Theme Files
Alternatively, if you need more control or if the Script Manager does not meet your requirements, you can modify the theme files directly:
- Add the following embed.js script before the
</head>
close tag in the header. Without it, the quiz won't be loaded on your website. - Obtain Automatic Embed Code: From the quiz builder, click
Share
, selectAutomatic
mode, andShow Instructions for Legacy Themes
. - Generate Popup Code: Adjust settings like popup duration, width or height and click
Get code
to generate an HTML code. - Access the Theme Files: Navigate to
Storefront
>My Themes
. Click onAdvanced
>Edit Theme Files
. - Modify the Footer File: Locate the file typically named
footer.html
or similar under theTemplates
directory. Paste your popup’s HTML code just before the closing