Shopify AB Testing Simplified: 4 Easy Steps

Rakesh Tiwari • Last Modified: December 29th, 2022

Shopify AB Testing

Do you know the full potential of your Shopify Website? Do you wish to know what changes your Shopify Store requires to gain more traction or conversions? If yes, then you have certainly landed at the right place!

Upon a complete walkthrough of this article, you’ll gain an in-depth knowledge of how to set up Shopify AB Testing with ease! You’ll gain a holistic understanding of Shopify, its key features, and how you can leverage it to host your business online and boost your revenue to new heights. Read along to learn more about Shopify AB Testing.

Table of Contents


  • An active Shopify account.
  • An active Google Optimize account.

Introduction to Shopify

Shopify Logo
Image Source

Shopify is one of the most popular E-Commerce Platforms that allow you to set up an online shop for your business with a single click. If you don’t want to go through the hassle of building your own website, setting up your store on Shopify is the best thing you can do for your business. Shopify hosts your business and helps it grow by allowing you to customize your website the way you want. Shopify gives you an online platform to market your products and conduct secure transactions.

You can sell anything on Shopify, from handcrafted artifacts to online courses. Shopify offers great versatility and also allows you to study and analyze customer behavior to garner valuable information about your business. Shopify gives users multiple plans and pricing to choose from, making it a suitable option even for small-scale startups. 

Key Features of Shopify

Some of the key features of Shopify are as follows:

  • Quick and Easy Setup: Stores can be launched quickly with Shopify, so you don’t have to worry about infrastructure and development costs. The administration interface is elegant and easy to use, as all the features are properly organized.
  • SEO and Marketing Tools: You can optimize your pages for Search Engines and increase your Sales with Shopify’s SEO Services and Plugins. The Shopify App Store gives you access to a wide variety of Marketing Tools, including Social Media Integration, Product Reviews, and Email Marketing.
  • Mobile-Friendly: All Shopify themes are mobile responsive, and the platform offers a free built-in shopping cart for mobile commerce, so your store looks great on all devices and your customers can shop from anywhere.
  • 24/7 customer support: Shopify places a high value on Customer Service. They are available 24 hours a day, 7 days a week. Alternatively, you can contact Shopify Customer Support by Phone, Email, or Webchat. Extensive documentation is also available in the Shopify Help Center so that issues can be resolved whenever they occur.

For more information on Shopify, click here to check out their official website.

Introduction to A/B Testing

A/B Testing
Image Source

An A/B Test is a randomized experiment that leverages two or more variants of the same website (A and B), where A is the Original Website and B is the Modified Website. It is a way of comparing two different versions of the same web page in order to find out which one of them performs the best.

To conduct an A/B test, select a web page of your choice for which you want to set up the A/B test, and then create a modified version of it by making small changes to it. The change can be as simple as a new title, adding a new button, or completely redesigning the webpage. Then show half of your traffic the original version and the other half the modified version.

When visitors visit/experience the original or modified version of the website, their participation in each experience is measured and collected in the control panel and analyzed by a statistical engine. You can then determine whether the changes you’ve made to your website are positive or negative for the visitors. In the later section of this article, you will be learning about the steps involved in setting up Shopify AB Testing.

Simplify your Data Analysis with Hevo’s No-code Data Pipeline

Hevo Data, a No-code Data Pipeline, helps load data from any data source such as Shopify, Databases, SaaS applications, Cloud Storage, SDKs, and Streaming Services and simplifies the ETL process. It supports 100+ data sources like Shopify and loads the data onto the desired Data Warehouse, enriches the data, and transforms it into an analysis-ready form without writing a single line of code. It helps transfer data from Shopify to a destination of your choice for free.

Its completely automated pipeline offers data to be delivered in real-time without any loss from source to destination. Its fault-tolerant and scalable architecture ensure that the data is handled in a secure, consistent manner with zero data loss and supports different forms of data. The solutions provided are consistent and work with different Business Intelligence (BI) tools as well.

Get Started with Hevo for Free

Check out some cool features of Hevo:

  • Secure: Hevo has a fault-tolerant architecture that ensures that the data is handled securely and consistently with zero data loss.
  • Connectors: Hevo supports 100+ data sources and integrations to SaaS platforms, files, databases, analytics, and BI tools. It supports various destinations including Google BigQuery, Amazon Redshift, Snowflake Firebolt Data Warehouses; Amazon S3 Data Lakes; and MySQL, MongoDB, TokuDB, DynamoDB, PostgreSQL databases to name a few.  
  • Schema Management: Hevo takes away the tedious task of schema management & automatically detects the schema of incoming data and maps it to the destination schema.
  • Minimal Learning: Hevo, with its simple and interactive UI, is extremely simple for new customers to work on and perform operations.
  • Hevo Is Built To Scale: As the number of sources and the volume of your data grows, Hevo scales horizontally, handling millions of records per minute with very little latency.
  • Incremental Data Load: Hevo allows the transfer of data that has been modified in real-time. This ensures efficient utilization of bandwidth on both ends.
  • Live Support: The Hevo team is available round the clock to extend exceptional support to its customers through chat, email, and support calls.
  • Live Monitoring: Hevo allows you to monitor the data flow and check where your data is at a particular point in time.
Sign up here for a 14-Day Free Trial!

Steps to Set up Shopify AB Testing

Now that you have a basic understanding of Shopify and A/B Testing, you are all set to learn about setting up Shopify AB Testing on your own. There are numerous tools available in the market that help you set up Shopify AB Testing, Google Optimize is extensively used to perform Shopify AB Testing as it is free and has an easy-to-use interface. With Google Optimize, you can test different variations of Webpages, Content, and UX and measure their performance against the KPIs you define.

 Follow the steps given below to perform Shopify AB Testing from scratch:

Step 1: Create and Configure Google Optimize Account

The first phase in setting up Shopify AB Testing involves creating and configuring a Google Optimize account. To do so, you can follow the listed steps:

  • If you don’t already use Google Optimize, click here to create your own Google Optimize account.
  • Log in to your Google Optimize account using your credentials.
  • Once you have successfully logged in to your account, add a new Container by clicking on the ‘+’ button at the top.
Google Optimize
Image Source
  • Click on Install Optimize, after you have added a new container. You will see Container Id as a part of the installation code snippet.
Installation code
Image Source

Step 2: Add Page Flickering Snippet to theme.liquid on Shopify

The second step of setting up Shopify AB Testing aims at improving the user experience for your Shopify Website. Page Flickering is defined as the event when an Original Page is briefly displayed during an A/B test before the new variation of the page appears. It generally happens because the browser takes some time to process the modifications. To minimize the Page Flickering, paste the following snippet at the top of your theme.liquid on Shopify:

Note: Any kind of template or page that you create for your business in Shopify is rendered (sampled) in the theme.liquid file. This is where you work with repetitive elements that appear in your Shopify store, such as Menu, header items, footer, etc.

<!-- Anti-flicker snippet (recommended) -->
<style>.async-hide { opacity: 0 !important} </style>
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};

This snippet also includes a timeout value which means that if the modified page is not processed within the set timeout value then Google Optimize will stop and the page will be loaded as normal. If you look closely at the end of the snippet, the timeout value is set to be 4000 which means 4 seconds. You can increase or decrease the timeout value at your convenience.

Step 3: Create a Hypothesis for your Shopify AB Testing

A Hypothesis is a prediction you make before carrying out your Shopify AB Testing. It depicts the changes that you want to make to your page while performing the testing. The Variable, Desired Outcome, and Rationale are the three elements of your hypothesis that must be examined, written, and documented before you set up and conduct an experiment. For example, if you sell a course online, then change your Call to Action button from ‘’Buy our Courses” to “Courses are selling fast – only 20 seats left”. Perform in-depth analysis on what other changes could be done and figure out the best course of action for your Shopify AB Testing.

Step 4: Create A/B Test Variants

  • Log in to your Google Optimize account.
  • Navigate to the main menu and click on Accounts.
  • If you are creating an experiment for the first time, click on Let’s Go.
Experience Section
Image Source
  • Click on Create Experiment option to create a custom experiment for conducting Shopify AB Testing.
Shopify AB Testing
Image Source
  • You can give a name to the experiment you are conducting.
  • Give the URL of the Shopify Page (Original Page) that you want to conduct the test on.
  • Select A/B test from the list of experiments available.
  • Once you have followed all the above instructions in the correct sequence, click on the Create New Variant button to create a modified version of the original page.
  • Click on the Editor to edit the page and make changes as per your requirements.
Image Source
  • Once you are satisfied with all the changes that you made, click on Done.

Once you have completed all the above steps, you can launch your A/B Test and analyze what are the changes that work best for your business. 


With Shopify AB Testing, you can dramatically increase the growth rate of your store while reducing bounces and missed conversions. Instead of spending the budget on acquiring traffic, you can use Shopify AB Testing to easily make changes to your store and generate revenue from the traffic you already have. In this article, you learned about Shopify, its key features, and the steps required to set up Shopify AB Testing from scratch!

With your Shopify AB Test, now up and running, you’ll need to extract data from Shopify and numerous other platforms to carry out your analysis. However, integrating and analyzing your data from a diverse set of data sources can be challenging and this is where Hevo Data comes into the picture.

Visit our Website to Explore Hevo

Hevo is a No-code Data Pipeline and has awesome 100+ pre-built integrations that you can choose from. Hevo can help you integrate data from numerous sources such as Shopify and load it into a Data Warehouse/Database or destination to analyze real-time data with a BI tool and create your Dashboards. It will make your life easier and make data migration hassle-free. It helps transfer data from Shopify to a destination of your choice for free. It is user-friendly, reliable, and secure. 

Want to take Hevo for a spin? Sign Up for a 14-day free trial and experience the feature-rich Hevo suite first hand. You can also have a look at the unbeatable pricing that will help you choose the right plan for your business needs.

Share your experience of setting up Shopify AB Testing. Tell us in the comments below!

No-code Data Pipeline for Shopify