Last updated: Dec 27 2017

Area: Episerver Profile Store Applies to versions: 1.3.0 and higher

Install and configure tracking for Profile Store

This topic describes how to install and configure tracking to Episerver Profile Store. This example creates an Episerver CMS sample site (Alloy), and adds tracking components using Visual Studio.


As part of the onboarding for the tracking service, Episerver sends the required subscription keys and tracking URLs to the technical contact for your project. Use the keys to configure the tracking for your websites. Contact Episerver for questions regarding the onboarding process.

In this topic

Create tracking in an Alloy site using Visual Studio

  1. Download the Episerver Visual Studio extension: https://marketplace.visualstudio.com/items?itemName=EPiServer.EpiserverCMSVisualStudioExtension.
  2. Create a new project in Visual Studio, and use the Episerver template.

  3. Select the Alloy (MVC) sample site.

  4. Use the Package Manager Console in Visual Studio to install Profile Store tracking. You should have a package source targeting the Episerver NuGet feed (https://nuget.episerver.com/feed/packages.svc/)

  5. To install the main tracking package, enter install-package EPiServer.Profiles.Client at the Package Manager Console prompt (PM>), (having the package source set to the Episerver Nuget feed).

    You now have to configure the site a tracking account. When you registered for Profile Store, Episerver provided a subscription key and tracking URL.

  6. Open web.config, and add or modify the following in the <appSettings> section:
    <add key="episerver:profiles.TrackingApiBaseUrl" value="" />
    <add key="episerver:tracking.Enabled" value="true" />
    <add key="episerver:profiles.ProfileStoreTrackingEnabled" value="true" />
    <add key="episerver:profiles.TrackingApiSubscriptionKey" 
    value="tracking subscription key for your profile store account" /
    • episerver:tracking.Enabled. Enables tracking for the base package EPiServer.Tracking.Core; any form of tracking on the site. This is a global Episerver setting. Setting this to false, or removing it, stops Episerver from tracking data to Profile Store, and other systems.
    • episerver:profiles.ProfileStoreTrackingEnabled. Enabled tracking for EPiServer.Profiles.Client; from the site to Profile Store. Setting this to false, or removing it, stops Episerver from tracking data to Profile Store.

      Note:  Both episerver:tracking.Enabled and episerver:profiles.ProfileStoreTrackingEnabled values must be set to true to track data to Profile Store.

    • episerver:profiles.TrackingApiBaseUrl. URL to the tracking endpoint for Profile Store. The URL is sent together with the subscription key, when an account is created.
    • episerver:profiles.TrackingApiSubscriptionKey. Subscription key for the tracking account. The subscription key URL is sent together with the URL, when an account is created.
    • episerver:tracking.IgnoreDNT. Causes the tracking system ignore the DNT (DoNotTrack) header when set to true. Use this with caution to not make visitors upset.
      <add key="episerver:tracking.IgnoreDNT" value="true" />

Install CMS integration for tracking to Profile Store

The CMS integration package for Profile Store tracking contains some additions to tracking. You should install this package on an Episerver CMS site. One example of extension is the scope handling.

Enter install-package EPiServer.Tracking.Cms at the Package Manager console prompt (PM>).

Isolate tracking events and profiles in a multi-site

You can isolate tracking events and profiles in scopes.

Scope separates tracking requests to the site ID of the site where data was tracked. The default implementation for a scope when installing EPiServer.Tracking.Cms is the SiteId for the site from which the tracking event was sent. Tracking events sent from a multi-site therefore are isolated in its different sites.

You can modify this behavior setting scope in one of the following ways:

  • In web.config, go to the <appSettings> section, and change value of ProfileStoreTrackingEnable to true. Also add a new key episerver:profiles.Scope.

    Note: Keep the scope values lowercased.

    <add key="episerver:profiles.ProfileStoreTrackingEnabled" value="true" /> 
    <add key="episerver:profiles.Scope" value="defaultscope" /> 
  • Implement an EPiServer.Tracking.Cms.ITrackingDataInterceptor. Implementing a custom tracking data interceptor is handled in a separate article.

Note: You can override the implementation for Scope in configuration file by setting episerver:profiles.Scope to the value you choose.

Related topics

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/