> For the complete documentation index, see [llms.txt](https://docs.intelligems.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intelligems.io/content-experiences/content-experiences-overview/how-to-set-up-a-template-change.md).

# How to set up a Template Change

A Template Change swaps one page template for another, letting you overhaul the layout and appearance of a specific page or page type. It's the best fit for structural changes scoped to a single template, like a product or collection page layout, rather than changes to a specific element (Content Edit) or an entire theme (Theme Change).

### **1. Create the experience**

From the Intelligems app, click **Create New Experience**, give it a name and description, and select **Template Change**.

* All templates included must be in a live theme.

### **2. Choose: Test or Personalization**

* Running it as a Test?
  * Rename the Test and add a Description. This is optional and internal only, but tests can stay live for weeks, so the more detail here, the more your future self will thank you.
  * Click the **+** button to create a group for each variation (2–5 groups) and name them.
  * Use the slider to set the traffic split for each group.
  * Click **Next Step** when you're done.
  * Note: the more groups you add, the longer it'll take to reach [statistical significance](/analytics/overview/experiment-analytics/statistical-significance.md).
* Running it as a Personalization? Skip groups entirely. You're building one always-on template for your targeted audience.

### **3. Assign your templates**

Select a template for each group, either an existing one or a duplicate of the control group's template using **Duplicate Control**.

* The control group must use the template currently live on your site. Only pages assigned to that template by default will be included, so a visitor is only included if they land on a page that's currently assigned to the control template.
* Only the templates you've chosen for your groups are affected; other templates on your site are untouched.
* Hover over a test group's screenshot for more options: **Edit in Shopify** (opens the template in Shopify admin), **Quick View** (desktop and mobile preview), **View in Browser** (live preview in a new tab), or click the template name to enter edit mode. If you've made changes to a template in Shopify, use the refresh button next to the group name to update its screenshot.

<figure><img src="https://2052204893-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2SvefuMLsJyJPAcVXeWc%2Fuploads%2FnCDFAJpSDQbbEBmRq5Rh%2FTemplate%20Test.gif?alt=media&amp;token=48c78dde-f391-4cb7-bfbd-922dbee216b6" alt=""><figcaption></figcaption></figure>

### **4. Set targeting (optional)**

For a Test, a visitor's group is assigned on their first visit and stored via a first-party cookie, so they'll see the same template on repeat visits during the test.

For a Personalization, everyone who matches your targeting sees it every time.

Either way, you can narrow who's included in several ways, all under the [Audience](/general-features/targeting/audience-targeting.md) option unless noted:

* UTM parameters
* JavaScript expressions
* Device type (mobile or desktop)
* New vs. returning visitors
* [Mutually Exclusive Tests](/general-features/targeting/mutually-exclusive-experiments.md) prevent visitors from being targeted by related experiments at the same time, to avoid interaction effects

### **5. Configure analytics**

What you configure here depends on which path you chose in step 2:

* Personalization? Add any [Custom Metrics](/analytics/overview/custom-events.md) you want to track, beyond the built-in ones.
* Test? Choose your Key Metrics and Primary Metric to measure against your control group, plus any [Custom Metrics](/analytics/overview/custom-events.md).

### **6. Preview and activate**

Preview your changes on the live site, then activate. The [Content Experience QA Checklist](/content-experiences/content-test-qa-checklist.md) has a Template Change section worth walking first.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.intelligems.io/content-experiences/content-experiences-overview/how-to-set-up-a-template-change.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
