> 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).

{% embed url="<https://www.loom.com/share/f0033ae2b10e493baadca94596998b86>" %}

### **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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
