Where Sitecore 9 stores anonymous contacts in DB? How Sitecore create anonymous contact start to end?



Sitecore keeps them in xDB. This could be MS SQL if Sitecore is 9.0.x. And MS SQL or Mongo if 9.1.

For each anonymous user, a new contact is created as well as two new contact identifiers. You will notice that an un-"known" contact has a generic identifier of xDB.Tracker and Alias. Once the user is identified, it becomes known and a new identifier is added.

In MS SQL, the [xdb_collection].[Contacts] table will look like this. You will have a new contact for each anonymous visitor.

enter image description here

And two identifiers for contact in the [xdb_collection].[ContactIdentifiers] table.

enter image description here


Without going to deep into the bits, to see how Sitecore creates the contact. You need to review the ensureSessionContext and initializeTracker pipelines. The ensureSessionContext has two processors. These are the two that load the contact from the users analytics cookie. Or creates a new contact in session.

  • Sitecore.Analytics.Pipelines.EnsureSessionContext.LoadContact,
  • Sitecore.Analytics.Pipelines.EnsureSessionContext.CreateContact

initializeTracker pipeline has a pipeline that brings it all together. This binds the contact to the current users session.

  • Sitecore.Analytics.Pipelines.InitializeTracker.CreateVisit


All interaction and contact data is stored in the xConnect Collection Database.

Starts with Session data.

All interaction information generated by visitors (anonymous or known) is stored in Session objects on the Content Delivery server.

On Session End (generally the timeout interval set in the web.config), the Session End event fires and all of the session data is sent to xConnect via the xConnect Collection Service.

Next Indexing Occurs

From there, interaction/contact information is indexed by the xConnect Collection Indexer service which updates the xDB index.

By default, the indexing of anonymous contacts is disabled. This prevents them from showing up in lists, like Experience Profile, however their analytics is still processed.

To enable the indexing of anonymous contacts, you can follow Sitecore's doc page on it.

Sitecore Processing Follows

Next, the Sitecore Processing role, aggregates the information using the xConnect Reference Data service. Information is aggregated and stored in the Sitecore Reporting Database.

Sitecore Reporting for Analytics

Sitecore Analytics utilizes the Sitecore Reporting role to display the graphs and data found in reports. It uses both the Reporting Database as well as the xConnect Reference Data service to pull information.

How Modules and Features Use Contact Data

Experience Profile

The Contact list in Experience Profile pulls directly from the xDB Index. If contacts are not indexed, then contacts will not show up here. You must enable Anonymous Contact indexing for Anonymous Contacts to show in Experience Profile. Best practice is that Experience Profile works best when Anonymous Contacts are NOT indexed.

List Manager

List Manager only segments and uses contacts that are known. Anonymous contacts are not utilized regardless of indexing.


Even though anonymous contact information is not indexed, interactions for that contact are kept. This allows for personalization to work even though the contact is not index.

Marketing Automation

Marketing Automation plans can be enrolled by known contacts only.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.