A/B tests are an excellent way to fine-tune your quizzes to ensure they are as effective as possible. You can use Octane AI with Google Analytics, Google Optimize, and (optionally) Google Tag Manager to run a redirect test to A/B test your embedded quizzes.

Click here for instructions on A/B testing opt-in pop-ups. ↗️

Setup Google products and integrate with Shopify

First, you'll need to setup your Google products and integrate them with Shopify. You can choose to use Google Tag Manager if you want to use that product to manage your external code, but it is not required.

You may be able to skip some or all of these steps if you're already using Analytics, Tag Manager, and / or Optimize on your Shopify store.

TIP: To make sure your Analytics, Tag Manager, and Optimize accounts are correctly setup on your Shopify store, install the Google Tag Assistant and Google Optimize extensions on your Chrome browser. These extensions can detect these tools and validate that they are performing as expected.

Setup with Google Tag Manager

1. Setup Google Analytics on Shopify. ↗️ Note that you'll need to ensure your Analytics account is setup with a Universal Analytics property (code starts with UA-). By default, new Google Analytics accounts are created with Google Analytics 4 properties (code starts with G-), but Shopify is not yet compatible with this property type.

2. Setup Google Tag Manager on Shopify. ↗️ If you use Shopify Plus, you can follow the above instructions fully and install the GTM code in the checkout.liquid file. If you do not use Shopify Plus, you won't have access to that file in your theme code, but you should still be able to install Google Tag Manager in the theme.liquid file and run a redirect test for your quiz.

TIP: If you don’t see the checkout.liquid file in your theme files (Online Store > Themes > Actions > Edit Code), please contact Shopify Plus support and ask them to enable it.

The checkout.liquid file located within the Shopify theme layout files.

3. Setup Google Optimize. ↗️

4. Link Optimize to Analytics. ↗️

5. Install Analytics with Tag Manager. ↗️

6. Install Optimize with Tag Manager. ↗️

7. Install the anti-flicker snippet. ↗️ This snippet should be placed in the <head> tag of the theme.liquid and (if you're using Shopify Plus) checkout.liquid theme files.

Setup without Google Tag Manager

1. Setup Google Analytics on Shopify. ↗️ Note that you'll need to ensure your Analytics account is setup with a Universal Analytics property (code starts with UA-). By default, new Google Analytics accounts are created with Google Analytics 4 properties (code starts with G-), but Shopify is not yet compatible with this property type.

2. Setup Google Optimize. ↗️

3. Link Optimize to Analytics. ↗️

4. In Shopify, go to Online Store > Preferences > Google Analytics and click Add custom JavaScript to Google Analytics.

5. Paste ga('require', 'OPT-#######'); into the text area, replacing the OPT-####### portion with your Google Optimize container ID.

Adding JavaScript to run Google Optimize in the Google Analytics settings.

6. Click Save.

7. Install the anti-flicker snippet. ↗️ This snippet should be placed in the <head> tag of the theme.liquid and (if you're using Shopify Plus) checkout.liquid theme files.

Setup your quizzes in Octane AI

Now that Analytics, Tag Manager, and Optimize are all in place, you can setup the quiz and the variant you want to test in Octane AI.

8. In Octane AI, create a new quiz or find the existing quiz that you want to run a test against. This will be your A version.

9. Select the three-dot menu and choose Copy quiz. This copy will be your B version.

The copy quiz button to create a copy of the selected quiz.

10. Edit the copied quiz (i.e. the B version) to make it distinct from the original quiz (i.e. the A version).

TIP: To follow A/B testing best practices, only change one thing in each test to make sure you can clearly attribute any improved metrics to that change.

11. Add the A version and the B version of your quiz to different pages on your Shopify store. ↗️

TIP: Think about how you will direct customers to this quiz. When you setup the redirect test, you will initially direct all traffic to the A version of the quiz, so make sure you account for that when setting up ads, adding navigation links, or adding other links to the quiz - you'll want to use the URL for the A version!

Setup your redirect test in Google Optimize

You can now setup your redirect test in Google Optimize to get your A/B testing up and running.

12. Create a redirect test in Google Optimize. ↗️

  • Enter the URL for the A version of the test as the editor page.

  • Enter the URL for the B version of the test as the redirect URL.

TIP: To follow A/B testing best practices, allow this test to run for at least two weeks. By default, Google Optimize will setup the redirect test to run for 30 days.

🎉. You're A/B testing! You can use Google Optimize and Octane AI quiz analytics to track the effectiveness of the A and B versions of the quiz.

Did this answer your question?