We need to regularly run a custom task to sync contacts in xDB from an external contacts list. It appears that we should use Sitecore's Analytics API to do this, and we think the task should run on our CM (Content Management) server, not our CD server.

The API to manipulate contacts in xDB appears to be the Sitecore.Analytics.Tracking.ContactManager class. This class relies on the "contactManager" node in Sitecore.Analytics.Tracking.config, which appears to rely on the "contactManager" node in Sitecore.Analytics.Tracking.Database.config to make it actually work; this from the comment in Sitecore.Analytics.Tracking.config:

"The default contact repository is a stub that prevents the contact manager from reading and writing to the collection database. This behavior is overridden by the Sitecore.Analytics.Tracking.Database.config file."

OTOH, Sitecore docs sometimes say you should disable Sitecore.Analytics.Tracking.Database.config on a CM server, but they're equivocal:

"If you have a dedicated content management server used for tracking but do not want to save changes to the collection database then disable the Sitecore.Analytics.Tracking.Database.config file. If you want to mix content management with other server features, or if there is a chance that other modules may depend on the tracking data access API, then you must enable this file again."

I can't tell what the above paragraph really means. So, my question is: what do we have to worry about if we enable Sitecore.Analytics.Tracking.Database.config on our CM server, in order to use the Sitecore.Analytics.Tracking.ContactManager class to update our contacts in xDB?

This is Sitecore 8.2.

References: https://briancaos.wordpress.com/2015/10/09/sitecore-contacts-create-and-save-contacts-directly-to-and-from-xdb-mongodb/ https://doc.sitecore.net/sitecore_experience_platform/82/setting_up_and_maintaining/xdb/configuring_servers/configure_a_content_management_server https://doc.sitecore.net/sitecore_experience_platform/82/setting_up_and_maintaining/xdb/server_considerations/server_configuration_features

  • Does your CM act as also Processing server? May 1, 2018 at 0:25
  • Yes. CM is also acting as Processing Server, also as Reporting Server. May 1, 2018 at 16:43
  • I would suggest if possible to have a dedicated processing server. If you enable the tracking analytics, the data users from the CM will also be tracked. Due to this, reporting will contain both data from CM and CD. Moreover, Processing server will allow you to gain in performance. Currently we had an issue whereby data in reporting database were 10+ days late because we had our Job server doing publishing, indexing and aggregation May 1, 2018 at 18:44
  • Thank you. The lines in ...Tracking.Database.config which enable the ContactManager appear to be just these: <tracking> <contactManager type="Sitecore.Analytics.Tracking.ContactManager, Sitecore.Analytics" singleInstance="true"> <param desc="sharedSessionStateManager" ref="tracking/sharedSessionState/manager" /> <param desc="contactRepository"> <patch:delete /> </param> </contactManager> </tracking> Do you think we could copy just these lines into another .config instead of enabling ...Tracking.Database.config, to enable ContactMgr? May 1, 2018 at 21:24
  • You can add it but you need to check if there are other statements that are required. Once you enable it, check your logs and see if there are other errors for analytics May 2, 2018 at 3:13


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.