Cooee never edits your theme. You create and design the alternate template yourself in Shopify, and Cooee reads your live theme to offer it as a variant. This article covers creating, naming, and cleaning up those templates.
Create an alternate template
In Shopify admin go to Online Store › Themes.
On your live theme, open … › Edit code, or use Customize to add a template visually.
Create a new template for the page type you want to test (product, collection, page, and so on).
Give it a clear suffix — this becomes the template's name. Design the page however you like.
Shopify names the file <page-type>.<suffix>.json (or .liquid) — for example product.daypack.json. The suffix daypack is what Cooee shows you and what gets added to the URL as ?view=daypack. Both JSON and Liquid alternate templates are supported.
Naming tips
Use short, descriptive, lowercase suffixes —
reviews-top,sticky-atc,3-col.Avoid spaces and special characters; hyphens are fine.
Pick a name you'll still recognise weeks later when you review results.
How Cooee finds your templates
When you choose a page type while setting up an experiment, Cooee reads your live theme and lists every alternate template it finds for that page type. Only templates in your live theme appear — if you built the template on a draft/unpublished theme, publish it (or copy it into the live theme) first.
Do not assign the alternate template to products or collections in Shopify admin. A template you assign to a product in admin is served to everyone who visits that product — which would also show the variant to your control group and invalidate the test. Configure the template only inside Cooee; Cooee decides who sees which version.
After the test: cleanup
Stopping an experiment does not delete anything from your theme — Cooee just stops sending visitors to the alternate template. The alternate template stays in your theme until you remove it. A Shopify theme can hold up to 1,000 templates, so it's good hygiene to remove alternates you no longer need.
To delete one:
Online Store › Themes › … › Edit code.
Open the templates folder.
Find the alternate (for example
templates/product.daypack.json) and delete it.
Editing theme code is high-risk. Deleting the wrong file can break your live store. Only remove a template once its experiment has stopped, and duplicate (back up) your theme before editing code on a live theme.
