HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Configure personalized content

Describes how to configure settings for personalization features when using audiences.

Provide access for editors to audiences

To access Audiences in the global menu, you must be a member of the CmsAdmins or VisitorGroupAdmins access groups; otherwise, you are prompted to a login page. If you want editors to add, edit, and delete audiences, you can provide access by adding them to VisitorGroupAdmins (CmsAdmins and CmsEditors are already defined in the configuration). The following example shows how to configure access for editors with the mapped virtualRoles in the appsettings.json file:

{
  "EpiServer": {
    "Cms": {
      "MappedRoles": {
        "Items": {
          "VisitorGroupAdmins": {
            "MappedRoles": [ "WebEditors" ],
            "ShouldMatchAll": "false"
          }
        }
      }    
    }
  }
}

Enable a geolocation provider

🚧

Important

As of version 11.4.0 of the Optimizely Content Management System (CMS) Visual Studio extension, new CMS projects will no longer be created with a Geolocation provider configured. The Geolocation provider that was shipped with CMS will also be removed in a future release as the MaxMind GeoLite database it depends on has been deprecated.

You can enable geographic location-based audiences by configuring a Geolocation provider service. Optimizely supplies a provider for the free GeoLite2 database from MaxMind through an optional NuGet package named EPiServer.Personalization.MaxMindGeolocation. The GeoLite2 Geolocation database can be downloaded from MaxMind’s website. Versions of this database are released regularly as the information is continuously updated.

The provider requires the IP lookup database (.mmdb) and the accompanying locations database (.csv) to serve an updated list of locations. The location of these files must be specified in your configuration, such as:

You can configure the provider by IServiceCollection interface in the startup.cs.

public class Startup {
  public void ConfigureServices(IServiceCollection services) {
    services.AddMaxMindGeolocationProvider("path\to\GeoLite2-City.mmdb", "path\to\GeoLite2-City-Locations-en.csv");
  }
}

📘

Note

Continent and Country names are localized using the usual localization in CMS while Regions are loaded directly from the Locations file.

Use the geographic location provided by a CDN

Optimizely Content Management System (CMS) also provides an option for retrieving Geolocation from the current request when supplied from the CDN in a request header. This option is only used in cases where no dedicated Geolocation provider is configured and only supports Continent and Country locations. See Content Delivery Network (CDN) Configuration for information on how to enable this option.