With Compose's Shopify integration you can easily split test Shopify Templates without writing a single line of code. You can create split template tests for pages, collections, products, or blogs.
Step 1: Create Your Templates in Shopify
Navigate to you Shopify Dashboard and go to "Sales Channels" > "Online Store" > "Themes." You should see your live theme at the top like the demo store shown below.
Click the "Customize" button and then click the page dropdown selector at the top where you can see all of your existing pages and templates.
As mentioned before, you can utilize Compose for any type of page template, but for this example we will be creating a product page template test, so I will click "Products," and then click "Create Template" at the bottom of the list. This modal will appear, and you can create a new template based on an existing template. I will use my current product page as the base and rename it to "Default Product Buy Now."
Then you can use Shopify's Theme Editor to revise this new template. For this example, the Theme I am using has the option to add a dynamic checkout button (Buy Now), so I am going to toggle it on to see if this positively impacts conversion rates.
Keep in mind, Compose allows for unlimited variants on an experiment, so if you would like to create several template variations for a single experiment you can. However, we recommend keeping this number reasonable, especially for low-traffic sites.
Step 2: Set Up the Experiment in Compose
Once you have completed your templates, navigate to your Compose dashboard and click "Create Experiment." Then select the "Shopify" variant type. Note: If you are testing the new theme vs. your current live theme you do not need to adjust the settings on the Define Control setting. It is set to display your live site as the control by default.
Then select "Select a Template."
Your template library will display, organized by type. For this example I will navigate to "Product" templates and select the template I just created "templates/product.default-product-buy-now.json"
And that's it! The rest of the setup process is identical to any other experiment. You will define any custom goals if applicable, set your audience and trigger conditions, traffic allocation, and then you can push it live. The only required step beyond this is to define a trigger condition.
For this example, since we are testing a product page template I will need to use an advanced regular expression trigger condition. I will set the page URL to "Matches" "https:\/\/la-lune-co\.myshopify\.com\/products\/"
We will be launching Shopify presets soon to make this process simpler, but for now you can read more on trigger conditions and advanced trigger conditions using regular expressions.