# Setting Cookie on the Main Domain

This feature determines whether first-party identifiers (f.e. JENTIS User-ID) is stored at the website’s subdomain or main domain level in your containers.

To configure this, go to **Account Settings** on the JENTIS Platform and click on **Containers**. Then, create a new container by clicking on **Add New Container**, or choose the container you want to edit and click on the three dots > **Edit**.

You will see the **Main Domain Cookie** feature in the **Advanced Settings** on your container configuration.

<figure><img src="https://2315305008-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy15ncufYr341K5U8q6Of%2Fuploads%2Fgit-blob-3a093c50f6788cf59a76376bf183a7a3e5417285%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
By default, the Main Domain Cookie option is enabled, which means the first-party identifiers are configured to be set at the main domain level.
{% endhint %}

To demonstrate the impact of setting the JENTIS Cookie on the main domain or subdomain levels, let's consider the following example:

JENTIS is implemented in this domain <https://ckion-dev.jtm-demo.com/>. The behavior of the JENTIS First-Party User ID (jts-rw cookie) can be observed based on whether the **Main Domain Cookie** is enabled or disabled:

1. **If the Main Domain Cookie is enabled** (Default)**:**
   * The cookie is set on the **main domain level**, in this case: `.jtm-demo.com`.
   * This means the cookie is accessible across all sub-domains of `jtm-demo.com`, such as `ckion-dev.jtm-demo.com`, `analytics.jtm-demo.com`, etc.\\
2. **If the Main Domain Cookie is disabled:**
   * The cookie is set on the **current sub-domain** level, in this case: `ckion-dev.jtm-demo.com`.
   * This means the cookie is only accessible within the specific sub-domain `ckion-dev.jtm-demo.com` and not shared with other sub-domains.

{% hint style="warning" %}
**Important**: Disabling the Main Domain Cookie (which sets the JENTIS cookie on the subdomain) will result in users from the subdomain receiving different identifiers, such as JENTIS User-ID. This change can impact your tracking and data consistency.
{% endhint %}

In case you’ve already had a container configured before 11 Dec 2024:

* If your container is configured to your main domain (e.g., `example.com`), the Main Domain Cookie option will be enabled. This means the first-party identifiers will be set at the **main domain level**.
* If your container is configured to a subdomain (e.g,. `shop.example.com`), the Main Domain Cookie option will be disabled. This means the first-party identifiers will be set at the **subdomain level**.

To change this configuration, follow the steps mentioned above.
