Enable/disable the xDB and the tracker
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, you must use the XP Scaled CD and CM packages. The XM Scaled 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.
You must also include the VisitorIdentification
tag or helper in your layout 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:
-
Create a patch file for the
\\path\to\web\root\App_Config\Sitecore\Marketing.xDB\Sitecore.Xdb.config
configuration file. -
To disable data collection, set the
Xdb.Enabled
setting tofalse
. -
Open the
web.config
file and in the<appSettings>
section, in the<add key="exmEnabled:define" value="yes"/>
setting, change the value to"no"
.NoteIf 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.
-
Optionally to disable tracking, set the
Xdb.Tracking.Enabled
setting tofalse
.
Reverse the instructions to enable the xDB and the tracker.
Enabling/disabling tracking per site
To disable tracking for a particular site:
-
Create a patch file for the
\\path\to\web\root\App_Config\sitecore.config
configuration file. -
In the
site
node, set theenableTracking
attribute totrue
orfalse
.RequestResponse<site name="customwebsite" enableTracking="false" ... />
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.
Disabling the xDB on the xDB Processing role
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.
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.
Effects of enabling/disabling the xDB or tracking
The following table describes the effect of enabling/disabling the xDB and tracking in different combinations.
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 are available.
Tracking |
xDB |
Role |
Effects |
---|---|---|---|
Disabled |
Enabled |
Content Management |
|
Content Delivery |
| ||
xDB Processing |
No change. Contact and interaction data that is created by calling the xConnect Client API directly is still processed. | ||
xDB Reporting |
No change. The xDB Reporting server role returns data from the xDB Reporting database. | ||
Enabled |
Disabled |
Content Management |
|
Content Delivery |
| ||
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. |
Disabling the xDB does not disable the xConnect Client, and you can still use the xConnect Client API.
Reasons to disable tracking when the xDB is enabled
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.