# How to Set Up a Content Test in Eraya

Content Tests in Eraya let you test **specific content or layout changes on a page or set of pages**, without editing theme code. Follow the steps below to launch your first test.

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

***

### Step 1: Name & Describe Your Test

Start by giving your test a clear name and (optionally) a description.

**Best practices:**

* Use a descriptive name (e.g. *Homepage Hero Headline Test*)
* In the description, note **what you’re changing** and **what you expect to learn**

This helps you identify the test later when reviewing results.

Click **Next** to continue.

<figure><img src="/files/yMw7GZWmbjr5k1i7gXBj" alt=""><figcaption></figcaption></figure>

***

### Step 2: Configure Test Variations

By default, Eraya creates:

* **Control** (original experience)
* **Variation B** (your test variant)

Each variation:

* Has its own traffic allocation (default is 50/50)
* Represents a different version of the same page

⚠️ Currently, content tests support **two variations**.

Once traffic adds up to 100%, click **Next**.

<figure><img src="/files/o65EmdbPnAkPwq1vuulw" alt=""><figcaption></figcaption></figure>

***

### Step 3: Configure Content Using the Visual Editor

This is where you define **what actually changes** in your content test.

Click **Open Visual Editor** to load your storefront with the Eraya editor overlay.

#### Using the Visual Editor

Inside the editor, you can:

* Click on any selectable element on the page
* Choose what should happen **per variation**:
  * **Leave as is**
  * **Modify text**
  * **Hide element**

You can:

* Edit text content
* Adjust basic styles (such as alignment or font size)
* Hide elements entirely for a specific variation

After making a change, click **Save Element**.

***

#### Refreshing & Editing Changes (Important)

Once you’ve saved changes in the Visual Editor:

* Click **Refresh** in the dashboard to reload and view your saved changes
* Changes made in the Visual Editor **cannot be edited directly from the dashboard**
* To **edit or remove** a change, you must:
  * Reopen the **Visual Editor**
  * Edit or delete the element from there

⚠️ The dashboard is **read-only** for content changes and is meant for review only.

<figure><img src="/files/zM4mArMH2C5qFsYMCe3M" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/toQB9P19VPSqO1tJjq5S" alt=""><figcaption></figcaption></figure>

***

### Step 4: Select Audience

Choose who should see the test.

By default:

* **All Visitors** are included
* Traffic is split based on your variation allocation

You can add an audience if you want to limit the test to a specific segment, but this step is optional.

Click **Next** to continue.

<figure><img src="/files/SzQ6HNVvCRlZKR6n7X9m" alt=""><figcaption></figcaption></figure>

***

### Step 5: Product Targeting (Optional)

This step controls **which product orders are included when reviewing test results**, and is especially useful for **Product Detail Page (PDP) tests**.

<figure><img src="/files/fvArSjndZFf0nBNVNB25" alt=""><figcaption></figcaption></figure>

You can choose to:

* **Target all products**\
  → All product orders will be included in test reporting
* **Target specific products**\
  → Only orders containing those products will be included in the results

⚠️ **Important:**\
Product Targeting does **not** change where the content test appears on your site.\
It only affects **which product orders are counted and shown in the test results**.

If your test is not product-specific, you can leave this setting as **Target All Products**.

Click **Next** to continue.

<br>

***

### Step 6: Review & Launch

Before launching:

* Review variation setup
* Confirm content changes
* Verify audience and product targeting

Once everything looks correct, **launch the test**.

Eraya will now start showing different variations to visitors and tracking performance.

***

### When to Use a Content Test vs Template Test

**Use a Content Test when:**

* You’re testing a specific page or URL
* You’re changing copy, visibility, or small layout elements
* The change should not affect the entire site

**Use a Template Test when:**

* The change must apply across all product pages or collections
* You want to hide/show elements globally (e.g. Add to Cart buttons)
* You’re testing structural or layout changes at scale


---

# Agent Instructions: 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:

```
GET https://eraya.gitbook.io/eraya-docs/content-testing/how-to-set-up-a-content-test-in-eraya.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
