Shopify

Split Test Shopify Templates Using Convert

A Step-by-Step Guide to A/B Testing Shopify Templates Using Convert's Split URL Testing Feature

This Article Will Help You:

  • Understand how to split test Shopify templates without changing your entire theme

  • Create and configure alternative Shopify templates for testing

  • Set up proper URL parameters for template variations

  • Create a Split URL test in Convert to compare templates

  • Set up location rules to ensure proper page targeting

  • Troubleshoot and resolve potential template testing issues

Introduction

Shopify allows you to create alternative templates for different page types in your store. With Convert's Split URL testing, you can compare your default templates with modified versions to identify which designs perform best for your business.

This guide will walk you through setting up a Split URL test to compare Shopify templates effectively, without needing to use Preview Mode or change your entire theme.

💡 Note: Unlike theme testing which requires Shopify Plus, template testing works with all Shopify plans since it doesn't require accessing checkout pages in preview mode.

Step 1: Create Your Template Variations

To begin, create alternative templates for the page types you want to test:

  1. In your Shopify admin panel, go to Online Store > Themes

  2. Click Actions > Edit code on your current theme

  3. Navigate to the Templates folder

For product pages:

  • Locate product.liquid

  • Create a duplicate file named product.alternate.liquid (or any name after the dot)

  • Make your design changes to this new template

  • Repeat for other page types as needed (collection, page, blog, etc.)

💡 The naming convention is important:
template-type.variation-name.liquid (e.g., product.alternate.liquid)

Step 2: Configure Your Template with Query Parameter Handling

1. Add Query Parameter Handler

Insert this code at the top of your template:


2. Implement Conditional Content

Wrap your variation-specific content in conditional statements:

<div class="product-info__product-picker
 " 
  >
  <!-- Variation-specific content here -->
</div>

This allows you to create multiple variations within a single template file by checking for specific parameters.

Step 3: Verify Template Variations

Before setting up your test, verify that your templates work correctly:

  • View a product page on your store

  • Add ?view=alternate to the URL (replacing "alternate" with whatever name you used after the dot)

  • Confirm that your alternative template displays correctly

For parameter-based variations within a template:

  • Add ?type=v1 to the URL

  • Verify that the conditional content appears correctly

Step 4: Create a Split URL Test

In Convert, create a Split URL test:

  1. Log in to your Convert.com dashboard

  2. Create a new experience and select "Split URL Test"

  3. Under "Edit Split URL Variations", enter:

For template-based testing:

  • Original URL: https://your-store.myshopify.com/*

  • Variation URL: https://your-store.myshopify.com/*?view=alternate

For parameter-based testing:

  • Original URL: https://your-store.myshopify.com/*

  • Variation URL: https://your-store.myshopify.com/*?type=v1

  1. In the advanced settings for the variation:

  • ✅ Enable "Support Regular Expressions (Regex)"

  • ✅ Enable "Transfer Original URL variables to the variation URL"

Your final test setup should look similar to this:

[Variation URL Configuration]

  • Original: https://your-store.myshopify.com/*

  • Variation: https://your-store.myshopify.com/*?view=alternate

Step 5: Set Up Location Rules

Ensure that the experiment applies to the correct page types in your store:

Location Settings:

  • If testing all page types:
    https://your-store.myshopify.com/*

  • If testing specific page types only:

    • Product pages: https://your-store.myshopify.com/products/*

    • Collection pages: https://your-store.myshopify.com/collections/*

Exclude pages where the test parameters are already present:

  • *view=*

  • *type=*



Important: These exclusions prevent redirect loops when parameters are already in the URL.

Step 6: Configure Test Settings

  • Set your traffic allocation (typically 50/50 for two variations)

  • Configure goals to track conversions:

    • Primary goal: Purchases

    • Secondary goals: Add to cart, email signups, etc.

  • Set audience targeting if needed

  • Enable QA mode and test each variation before launching


Step 7: Resolve Potential Issues

Handling Multiple Query Parameters

If your URLs already contain query parameters (like UTM tags):

  • Ensure "Transfer Original URL variables" is enabled

  • This appends your test parameters while preserving existing parameters

Resulting URL example:
https://your-store.myshopify.com/products/example?utm_source=email&view=alternate

Template Not Loading Correctly

If your template doesn't appear to be working:

  • Double-check that the template filename matches exactly what’s in the view= parameter

  • Ensure your template is properly formatted and contains all required Liquid code

  • Verify the parameter handler code is correctly placed at the top of your template file

  • Clear cache and test in incognito mode

Step 8: QA and Launch Your Test

Before launching:

  • Enable "QA Mode" in Convert

  • Test each variation across different page types

Verify that:

  • Templates load correctly

  • Conditional content appears as expected

  • All functionality works properly

  • Session data persists between pages

  • Goals track correctly

When satisfied with your QA, set the test status to "Running" and begin collecting data.

Step 9: Analyze and Implement Results

After your test reaches statistical significance:

  • Review performance metrics by page type and device

  • Identify which template or variation performs best

To implement the winning template permanently:

  • For template-based tests:
    Rename the winning template to replace your default template or copy the winning design elements to your default template

  • For parameter-based tests:
    Make the conditional content in your winning variation the default content

IMPORTANT:
Template testing is page-type specific. If you tested product templates, the results may not apply to collection pages or other page types. Consider testing each page type separately for the most comprehensive optimization.

By following these steps, you can effectively test template variations in your Shopify store and determine the best-performing designs for each page type.