---
title: Configuring contact recognition
related:
  - https://docs.kentico.com/k9/on-line-marketing-features/contact-management/working-with-contacts.md
  - https://docs.kentico.com/k9/on-line-marketing-features/contact-management/working-with-contacts/mapping-fields-to-contact-attributes.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

> **Info:** **Kentico EMS required**
>
> Features described on this page require the **Kentico EMS** license.

Most current sites need to deal with contact recognition scenarios involving visitors with same IP addresses. Visitors often come from shared networks, such as company or municipal networks. Kentico's contact recognition is configured so that it best covers these scenarios. This means that Kentico doesn't automatically assign contacts to anonymous visitors based on their:

- _Browser user agent_
- _IP addresses_

The system also remembers contacts until their cookies are deleted or until a different contact is determined for the visitor.

If this behavior doesn't suit your needs, you can change it programmatically by implementing the Kentico's _ICurrentContactProvider_ interface:

1. Create a class that implements the _ICurrentContactProvider_ interface.
2. Implement your own logic for contact recognition.

   ```csharp

   using System;

   using CMS;
   using CMS.Membership;
   using CMS.OnlineMarketing;
   using CMS.SiteProvider;
   ...
   [assembly: RegisterImplementation(typeof(ICurrentContactProvider), typeof(CustomCurrentContactProvider))]
   /// <summary>
   /// Summary description for CustomCurrentContactProvider
   /// </summary>
   public class CustomCurrentContactProvider : ICurrentContactProvider
   {
       public ContactInfo GetCurrentContact(RequestDependencies request, SiteInfo site, CurrentUserInfo currentUser, bool forceUserMatching)
       {
           // Implement your contact recognition logic.
           throw new NotImplementedException();
       }

       public void SetCurrentContact(CMS.SiteProvider.SiteInfo site, ContactInfo contact)
       {
           // Implement your logic for storing information about the current contact.
           throw new NotImplementedException();
       }
   }

   ```
3. Save the file.

> **Note:** **Tracking web bots**
>
> Contact management does not track [web bots](http://en.wikipedia.org/wiki/Web_robot) (such as search engine crawlers) by default, because they are not relevant from a marketing point of view. If you wish to log bots in the system as contacts, you can change the default behavior by adding the following key to the _appSettings_ section of your web.config file:
>
> ```html
>
> <add key="CMSEnableContactBots" value="true" />
>
> ```
