Home » How to do an A/B test on Shopify?

How to do an A/B test on Shopify?

  • by
How to do an A/B test on Shopify?

If you are not convinced by the conversion of your Shopify store, you can carry out what is called an “A/B Test”.

Concretely, the objective of an “A/B Test” is to put two different versions of the same element in competition.

For example, if you want to optimize the conversion rate of a sales page of your Shopify store you can create two different versions of this same page or you will change the appearance, the texts or other elements of the page while keeping the main objective.

Then, you will display version A once to a user then version B to another user to obtain on several users a final result which will designate which of the two versions of your page performed better.

It is this test that you will learn to set up in this tutorial on your Shopify store using a free tool called “Google Optimize”.

Create and configure a Google Optimize account

Before creating your first A/B Test on your Shopify store, you will need to configure the Google Optimize tool.

See also
How to sell a Shopify store and on which platform?

To get started, you’ll need to install Google Analytics on your Shopify store if you haven’t already.

You can use our tutorial on how to install Google Analytics on Shopify if you’ve never done this before.

Once Google Analytics is linked to your Shopify store, go to the Google Optimize homepage to create your account.

Create and configure a Google Optimize account
  1. Start by clicking on the “First steps” button on the tool’s home page:
  2. Activate or not the reception of e-mails from Google Optimize according to your preferences then click on the “Next” button to go to the next step.
  3. Read and agree to the GDPR and Terms of Service after entering your country to proceed.

Create an A/B test with Google Optimize

Now that your Google Optimize account is created and linked to your Google account, you can now start your first Google Optimize experience by clicking on the “Get started” button.

Create an A/B test with Google Optimize

In the tab that opens on your screen, enter a name for the experience to create, the URL of the page of your store to test and select in the type of experience “A/B test”:

Create an A/B test with Google Optimize

You have just created your first Google Optimize experience. This one is currently in draft and must be configured to be able to start it.

See also
How to connect instagram and facebook on shopify?

Add and edit a variant

Start by adding a variant to your experience by clicking the “Add variant” button:

Add and edit a variant Shopify

A modal window then opens on your screen asking you to enter the name of the variant to add.

Set the name of the first variation to add to your experiment (1) then click the “OK” button to continue setting up the A/B testing experiment.

Add and edit a variant Shopify

Add as many variants as you want by clicking “Add variant” below the last variant added.

When you’ve added all the variations you need, you’ll need to install the “Google Optimize” Chrome extension .

If you do not have this extension installed on your browser, click on the “Display” button (1) to the right of the line of the “Original variant” to display a popup which will offer you to display the extension (2).

Add and edit a variant Google Optimize Shopify

This will redirect you to the “Google Optimize” extension file on the chrome web store, you will just have to click on the “Add to Chrome” button to install it on your web browser.

Once the “Google Optimize” extension is installed on your browser, you will need to modify the variant(s) you have added to your experience.

Click the “Edit” button to the right of a variant to edit it.

Add and edit a variant Google Optimize Shopify

Google Optimize will then open your experiment’s variation page in an editing tool that allows you to edit the variation page in real time.

See also
Shopify CMS: Why prefer using Shopify's CMS?

To modify an element on the variant, click on the element in question (1) then in the popup window that is displayed, click on “Modify the element” (2).

Add and edit a variant Google Optimize Shopify

You will then be offered several modification options such as “Delete”, “Modify the text” or “Modify the HTML code”.

Since in our example we have selected a title to modify, we will choose to “Modify the text”.

Once the element has been modified (1), click on the “OK” button (2) to validate the modification of the page element.

Add and edit a variant Google Optimize Shopify

Finally, click on the “Save” button to save the changes then on “OK” at the top right to exit the editing tool.

Edit any variants you’ve added to your experience and then move on.

Define the objective of the experiment

When you are done with the variations of your experiment, you will need to define the objective(s) of the experiment.

First, you will need to link the Google Analytics account linked to your Shopify store to your Google Optimize experience.

Click on the “Associate with Analytics” button (1) located in the “Measurements and objectives” section then select the Google Analytics property that measures the statistics of your Shopify store (2).

Complete the association by clicking on the “Associate” button (3).

Define the objective of the experiment Optimize Shopify

Then add a first objective to your Google Optimize experience by clicking on the link “Add the objective of the test” (1). You will then be offered two options (2):

  • Choose from list
  • Create a custom goal
Define the objective of the experiment Optimize Shopify

If this is your first experience, we advise you to choose a goal from the predefined list of Google Optimize.

See also
How do I use Oberlo on Shopify?

For the example, we will choose the “Session duration” objective proposed in the list of Google Optimize objectives.

After adding your first objective, you can add additional objectives by clicking on the “Add an additional objective” link under the main objective.

Install Google Optimize On Shopify

Before you can finally start your first Google Optimize experience, you will need to install Optimize on your Shopify store.

If you have already installed it, click on the “Check installation” button (1) to validate the installation of Optimize on your site.

Otherwise click on “Show instructions” (2) to begin installing Optimize on your store.

Install Google Optimize On Shopify

This will open a modal window with an HTML (1) “script” tag to copy and paste between the “head” tags, before the closing “</head>” tag,   in your Shopify theme’s ” theme.liquid ” file. .You can edit your Shopify theme’s “theme.liquid” file by going to “Online Store > Themes > theme.liquid” from your Shopify store admin panel.

Then click on the “Check installation” button (2) when you have copied the HTML line and saved the changes to the “theme.liquid” file of your current Shopify theme.

Install Google Optimize On Shopify

For the installation of Optimize to be valid, you must have installed “Google Analytics” on your Shopify store with the same property that you have associated with the Google Optimize experience.

See also
How do I put a product on Shopify?

If the installation is successful, you will then receive a message “Optimize is correctly installed”, then click on the “Back to experience” button to return to the configuration of your experience.

Install Google Optimize On Shopify

Start the Google Optimize experience

All configurations are complete, the experiment draft is ready to be published.

When your experiment is ready to start, a “Start” button will appear at the very top of the experiment.

Click on the “Start” button (1) once, then a second time (2) after the confirmation message appears, to start the A/B testing experience.

Start the Google Optimize experience Shopify

Wait for the experiment to complete or end the experiment at any time with the “Finish” button to see the final results of your A/B test on your Shopify store.

Start the Google Optimize experience Shopify

Conclusion

Performing A/B testing on the important pages of your Shopify store is necessary if you want to optimize your conversion rate for a given objective.

Thanks to Google Optimize, you can carry out these tests simply and for free with a single Google account linked to Google Analytics.

The environment offered by Google offers many solutions to monitor and optimize your online store.

See also
Shopify Alternatives: What are the solutions better than Shopify?

Leave a Reply

Your email address will not be published.