---
title: "Enable/disable the xDB and the tracker"
slug: "enable-disable-the-xdb-and-the-tracker"
abstract: ""
---
# Enable/disable the xDB and the tracker

> [!important]
> In Sitecore 9.1 and later, you can only enable/disable the tracker and the xDB if you used the XP Scaled topology packages to install the Content Management (CM) and Content Delivery (CD) roles. To use [limited personalization with an Experience Manager license](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/sitecore-xp-feature-compatibility-when-the-xdb-is-disabled.html "Sitecore XP feature compatibility when the xDB is disabled"), you must use the XP Scaled CD and CM packages. The [XM Scaled](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/using-xm-scaled-packages-to-run-sitecore-without-the-xdb.html "Using XM Scaled packages to run Sitecore without the xDB") packages only contain CMS-specific components and do not include the configuration files mentioned in the this topic.

Change the `Xdb.Enabled` and `Xdb.Tracking.Enabled` settings to enable or disable the tracker and the xDB. Depending on your requirements, you can choose to:

- Disable the xDB and disable tracking.
- Disable the xDB and enable tracking.
- Enable the xDB and disable tracking.
- Enable the xDB and enable tracking.

> [!important]
> You must also include the [`VisitorIdentification` tag or helper in your layout](https://doc.sitecore.com/xp/en/developers/91/sitecore-experience-platform/enable-the-web-analytics-tracking-feature.html) in order to track visitors.

To disable the xDB and the tracker, perform this procedure on all the servers that have the Content Management and Content Delivery roles:

1. Create a patch file for the `\\path\to\web\root\App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.config` configuration file.
2. To disable data collection, set the `Xdb.Enabled` setting to `false`.
3. Open the `web.config` file and in the `<appSettings>` section, in the `<add key="exmEnabled:define" value="yes"/>` setting, change the value to `"no"`.

    > [!note]
    > If you have disabled the xDB, you must also disable the Email Experience Manager (EXM). If you are only disabling tracking, you do not have to disable EXM.

4. Optionally to disable tracking, set the `Xdb.Tracking.Enabled` setting to `false`.

Reverse the instructions to enable the xDB and the tracker.

<details>
<summary><h2>Enabling/disabling tracking per site</h2></summary>

To disable tracking for a particular site:

1. Create a patch file for the `\\path\to\web\root\App_Config\sitecore.config` configuration file.
2. In the `site` node, set the `enableTracking` attribute to `true` or `false`.

    ```text
    <site name="customwebsite" enableTracking="false" ... />
    ```

> [!note]
> If the `Xdb.Tracking.Enabled` is set to `false`, tracking is disabled for all sites - even if `enableTracking` is set to `true` on an individual site node.

</details>

<details>
<summary><h2>Disabling the xDB on the xDB Processing role</h2></summary>

If you temporarily disable the xDB and the tracker in a Sitecore XP environment, you can disable the xDB on all xDB Processing server roles as well. This affects [features such as aggregation and the ability to rebuild the reporting database](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/enable-disable-the-xdb-and-the-tracker.html#UUID-821e8314-b10a-b12c-3fbb-bf852481d5a4_xdb-processing).

> [!note]
> If you have an Experience Platform license, disabling the xDB and the tracker on the core server roles (CD, CM, Processing, and Reporting) does not prevent you from using the xConnect Client API to work with contacts and interactions in the xDB.

</details>

<details>
<summary><h2>Effects of enabling/disabling the xDB or tracking</h2></summary>

The following table describes the effect of enabling/disabling the xDB and tracking in different combinations.

> [!note]
> If you used Sitecore 9.1 XM Scaled packages to install the Content Delivery and Content Management server roles, a [reduced list of compatible features](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/using-xm-scaled-packages-to-run-sitecore-without-the-xdb.html "Using XM Scaled packages to run Sitecore without the xDB") are available.

| Tracking | xDB | Role | Effects |
| --- | --- | --- | --- |
| Disabled | Enabled | Content Management | <ul><li>In-session personalization is available, but personalization rules that rely on tracking are not. For example, you cannot personalize based on goals, campaigns, or GeoIP.</li><li>xDB cannot identify contacts.</li><li>Contacts cannot be enrolled in Marketing Automation campaigns.</li><li>IP Geolocation services are unavailable.</li><li>You cannot perform content testing</li></ul> |
|  |  | Content Delivery | <ul><li>Contacts cannot be identified.</li><li>Contacts cannot be enrolled in Marketing Automation campaigns.</li><li>IP Geolocation services are unavailable.</li></ul> |
|  |  | xDB Processing | No change.<br><br>Contact and interaction data that is created by calling the xConnect Client API directly is still processed. |
|  |  | xDB Reporting | No change.<br><br>The xDB Reporting server role returns data from the xDB Reporting database. |
| Enabled | Disabled | Content Management | <ul><li>Marketing Automation campaigns cannot be created or processed.</li><li>Data cannot be collected in the Preview environment.</li><li>Contacts cannot be identified.</li><li>You cannot deploy Marketing Operations definitions to the Reference Data service.</li></ul> |
|  |  | Content Delivery | <ul><li>Contacts cannot be identified immediately, and any data gathered from the contact is discarded at the end of the session.</li><li>You can use personalization rules for contact facets and segmentation.</li><li>IP Geolocation services are available.</li><li>Marketing Automation campaign processing occurs for the live session.</li><li>Contact repositories are available for the session, and outcomes that are triggered during the session are registered.</li></ul> |
|  |  | xDB Processing | The xDB Processing role does not process contact and interaction data. This includes data created by calling the xConnect Client API directly. |
|  |  | xDB Reporting | You cannot rebuild the *Reporting* database. However, the xDB Reporting server role returns data from the xDB Reporting database. |

> [!note]
> Disabling the xDB does not disable the xConnect Client, and you can still use the xConnect Client API.

</details>

<details>
<summary><h2>Reasons to disable tracking when the xDB is enabled</h2></summary>

We recommend that you disable tracking on Content Delivery servers if:

- Some Content Delivery servers are used exclusively to serve static content, such as digital assets, and do not require personalization.
- You want to ensure that your implementation complies with privacy legislation.
- You write data to the xDB from other sources - such as a mobile application - but do not wish to track visitors on your website.

</details>