Template tests let you compare two completely different page layouts by leveraging Shopify’s native alternate template system. Variant visitors are routed toDocumentation Index
Fetch the complete documentation index at: https://arkticstudio.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
?view=<suffix> which loads your alternate template server-side — no JavaScript injection needed.
Supported template types
- Product pages (
templates/product.json) - Collection pages (
templates/collection.json) - Regular pages (
templates/page.json) - Homepage (
templates/index.json) - Blog listing (
templates/blog.json) - Article pages (
templates/article.json)
Setup
Step 1 — Duplicate your template
In your Shopify theme code (use the Theme Editor’s Edit code view, or a local development setup):- Go to the
templates/directory - Copy your target template (e.g.
product.json) - Paste it with a new name — add a suffix after the type:
product.my-test.json
my-test) is what you’ll enter in Split Tester.
Step 2 — Customise the duplicate
Make your layout changes in the Theme Editor:- In Online Store → Themes → Customize, open the template dropdown (top center)
- Select your alternate template (e.g. Products / my-test)
- Rearrange sections, add/remove blocks, change settings
- Save
Step 3 — Create the experiment
- In Split Tester, go to New experiment and choose Template test
- Select the Template type (e.g. Product)
- The Variant template dropdown will show all alternate templates found in your live theme
- Select your duplicate template and create the experiment
Step 4 — Configure and start
The control variant uses the default template automatically — no configuration needed. The variant is pre-configured with the view name from Step 3. Click Start experiment.How routing works
When a variant visitor lands on a product page:- The JS checks if
?view=my-testis in the URL - If not, it redirects to the same URL with
?view=my-testappended - Shopify loads
templates/product.my-test.jsonserver-side - All Liquid, sections, and metafields render normally
Routing scope
Template tests only redirect on matching URL patterns. A product template test won’t append?view= to collection or homepage URLs.
| Template type | Applied on |
|---|---|
| product | /products/* |
| collection | /collections/* |
| page | /pages/* |
| index | / |
| blog | /blogs/<handle> |
| article | /blogs/<handle>/<slug> |
Notes
- Shopify falls back to the default template if the alternate doesn’t exist — so a misconfigured test won’t break the page
- The
?view=parameter persists as visitors navigate within the same template type - No app block needed — this is entirely URL-based routing