Contact configuration

Contacts in Xperience by Kentico represent people who view and interact with content through channels, e.g., visitors of a website. Each contact stores the visitor’s personal data and other marketing-related information.

On websites, contacts cover both anonymous visitors (identified by an HTTP cookie, depending on the Default cookie level) and users who identify themselves by submitting their name, email address and other data. The system automatically tracks the activities that contacts perform on the website and gathers data about contacts based on the actions and input of the associated visitors.

The collected contact data allows marketers to analyze client behavior, optimize content, identify potential buyers, and perform other marketing‑related actions.

Contacts and channels

Contacts are global and shared across all content channels. For example, if you use your Xperience application to run two websites, send messages through an email channel, and deliver content to an external application through a headless channel, visitors and email recipients from all channels will belong to the same pool of contacts.

Contact tracking requirements

The contact tracking functionality in Xperience is enabled by default. However, due to personal data protection policies, contacts are only tracked for website channels with the Default cookie level set to Visitor or All, or if visitors give tracking consent and increase their cookie level. For more information, see Consent development.

Get the current contact

The system uses the CurrentContact browser cookie as persistent storage for the current contact. By default, the storage is empty. However, once you ask for the current contact, the system sets the contact’s GUID (unique identifier) to every response cookie.

To get the current contact in the your application’s code, call the ContactManagementContext.GetCurrentContact method. The context class and method are available in the CMS.ContactManagementont namespace.

using CMS.ContactManagement;


// Gets the current contact
ContactInfo currentContact = ContactManagementContext.GetCurrentContact();

If there is no contact related to the currently processed request, the GetCurrentContact method automatically creates and returns a new anonymous contact by default. You can disable the automatic creation of new contacts by calling the method with a false bool parameter.

Contact management services and dependency injection

If you wish to use the dependency injection design pattern, you can create a custom service to provide the required contact management functionality. Call the methods of the ContactManagementContext class within the service’s implementation.

Configure contact tracking

Depending on the project requirements, developers and administrators can adjust how the system recognizes contacts or processes contact data. This enables marketers to work with contacts more efficiently.