Perform A/B testing integration in Shopify

ByAdam

Perform A/B testing integration in Shopify

A/B testing is powerful software which helps increase conversion rate in Shopify website. In this post, we show you the way to integrate A/B testing in Shopify.

Step 1: Get Project code

First, you need to get Project ID Number at Settings in Project

Step 2: Add code to Shopify

  • Navigate Online Store> Themes> More Actions> Edit Code
  • Choose liquid layout
  • Add tracking code
  • Insert following code:

    Ensure that you replace Project ID Number and replace this total text <REPLACE THIS WITH PROJECT ID NUMBER>
  • Save the changes

Step 3: Add code to Checkout pages

Adding code to Checkout pages helps track conversions.

  • Go to Online Store> Preferences
  • Scroll down, in Google Analytics, insert following code in Additional Scripts:
  • Replace “XXXXXX-XXXXX” with Project ID Number
  • Then allow Checkout page domain in Project Settings by adding the specific domain at Active Websites in Project Settings

Step 4: Forward tracking cookies to checkout domain

  • Navigate to Online Store> Themes> More Settings> Edit HTML/CSS
  • Edit cart template
  • In theme templates, tap Sections then choose cart-template.liquid file
  • Paste following code inside this file before <form> tag:
  • Paste following code inside <form> tag:

Step 5: Manual revenue tracking

Add following code under Settings> Checkout> Additional content & scripts:

In which: “XXXX” is Goal ID

Step 6: Save the installation

Hope you guys perform successfully.

Thanks for reading!

About the author

Adam administrator

Leave a Reply