Skip to main content

Template experiments: overview

Test two versions of a Shopify page template against each other on live traffic.

Written by Shashank Agrawal

A template experiment lets you A/B test two versions of a Shopify page template — your existing template versus an alternative you design — by splitting live traffic between them. It's the most surgical way to test on Cooee: instead of swapping your whole theme, you test one page type (product, collection, homepage, and so on) in place.

How it works

Shopify lets a single theme hold more than one template for the same page type. The extra ones are called alternate templates and are identified by a suffix — for example product.daypack.json is the daypack alternate of your product template. Shopify renders an alternate template whenever the URL carries a ?view=<suffix> parameter.

Cooee builds the experiment on top of this native mechanism:

  • Control — visitors see your normal template (no ?view= is added).

  • Variant — visitors are sent to ?view=<suffix>, so Shopify serves your alternate template.

Assignment happens in the visitor's browser the moment they land on a targeted page. It is deterministic (the same visitor always lands in the same arm) and needs no server round-trip, so there is no added latency and no flicker. Because assignment relies only on the URL parameter, there is no persistent cookie to clean up — when you stop the experiment, Cooee simply stops adding ?view= and everyone sees the control again.

What you can test

Template experiments are available for every standard Shopify page type:

  • Homepage

  • Product pages

  • Collection pages

  • Pages (custom / landing pages)

  • Blog and article pages

  • Cart page

  • Search page

A template powers many pages at once — one product template typically serves every product. So a change you make to a product variant template is tested across all product pages in scope, not one product at a time. You can narrow the scope to specific URLs (see Setting up a template experiment).

What it can't change

A template experiment only controls the content between your header and footer. It cannot change:

  • Header, navigation, or announcement bar

  • Footer or other global sections

  • Global theme settings — colours, fonts, spacing

  • Cart type (drawer vs. cart page)

  • Product prices

To test global elements or a completely different look, use a Theme A/B test instead.

Before you start

You build the alternate template yourself in Shopify — Cooee never edits your theme. The typical flow is:

  1. Create and design an alternate template for the page type you want to test (this is the "variant").

  2. Create a template experiment in Cooee, choose the page type, pick your alternate template as the variant, and set the traffic split.

  3. Publish. Cooee starts assigning visitors and reporting results.

See Setting up a template experiment for the full walkthrough and Managing your variant templates for creating and naming templates in Shopify.

Did this answer your question?