Enable user agent string caching

Abstract

Procedure to enable user agent string caching in the Reference Data database for Sitecore 9.3 and later.

Applies to

Content Delivery

For Sitecore versions 9.2 and earlier, user agent strings are cached in the Reference Data database to minimize the number of requests to the Device Detection service. For Sitecore 9.3, this caching is no longer necessary. Instead, user agent strings are retrieved directly from the Device Detection component that has the device database loaded into memory.

Note

User agents are web browsers, and each user agent has a string that identifies it and the operating system it is running on. Each time a visitor makes a request to a web server, the user agent string is included in the request.

An example of a user agent string: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

If you have custom code in your Sitecore installation that requires caching of user agent strings, you can enable it.

To enable user agent string caching:

  1. Go to the App_Config\Sitecore\Marketing.Tracking folder.

  2. Open the Sitecore.Analytics.Tracking.config file.

  3. Remove the DisableUserAgentDataDictionaryProcessor processor setting.

    <initializeKnownDataDictionaries>
        <!-- Remove DisableUserAgentDataDictionaryProcessor to enable user agent dictionary -->
        <processor type="Sitecore.Analytics.DataAccess.Pipelines.InitializeKnownDataDictionaries.DisableUserAgentDataDictionaryProcessor, Sitecore.Analytics.DataAccess"/>
    </initializeKnownDataDictionaries>