Can we enable xDB for a specific website and disable it for other? I know we have this option for xdb tracking but what about Xdb.Enabled
? can this setting be true/ false for a specific site?
-
What is your purpose? Means what do you want to achieve?– Gaurav AgarwalOct 20, 2022 at 6:02
3 Answers
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 can control tracking by site definition like the below -
<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.
The following table describes the effect of enabling/disabling the xDB and tracking in different combinations.
Follow this article for details - https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/enable-disable-the-xdb-and-the-tracker.html
Update - You can Disable Analytics on an item. Try this to apply on Home items and see if this is also disabled on child items because I never used this feature.
To disable or enable analytics on an item:
In the Content Editor, expand the content tree and navigate to the content item that you want to change the analytics setting for.
On the ribbon, on the Analyze tab, in the Attributes group, click Attributes.
In the Attributes dialog, click the Settings tab and select or clear the Disable Analytics for this Item check box to assign this setting to the content item.
When you select Disable Analytics for this Item, the item is no longer visible in the visitor session trail or any other reports in Sitecore.
Click OK to save your changes and close the Attributes dialog.
Follow this - https://doc.sitecore.com/xp/en/users/93/sitecore-experience-platform/disable-analytics-on-an-item.html
-
I want to disable XDB not tracking, can that be done specific to website ? Oct 20, 2022 at 6:18
-
1What is your exact requirement, there is no OOTB way to disable xdb for a particular website. Oct 20, 2022 at 6:23
You can enable/disable 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 the enableTracking attribute to true or false
<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.
XDB can not be disabled for a specific site in a multisite setup either it is on for all or off for all.