Episerver Insight and the Profile Store – Basic Implementation

A couple of weeks ago, I got the chance play with Episerver Insight on a local epi installation. It was very quick to setup, and tracking can be easily customised. Before I go into detail on how to set it up, here’s a quick overview of what it is and what it’s not. Episerver Insight

What is Episerver Insight?

Episerver Insight is really just a User Interface (UI) that sits on top of Episerver’s Profile Store (more on this later). It provides visualisation on your website’s users, whether they are identified or marked anonymous. The UI also allows for filtering visitors profiles and creating segments that could then later be used for personalising content.

What it’s not – It’s important to note that the tracking mechanism is not enabled by Insight, but by Episerver’s Profile Store. The reason they are decoupled is because the Profile Store provides brains to other Epi products that do very different things. I will go over the Profile Store in the next section, but for now, here’s a screenshot of what the Insight dashboard looks like. As you can see, the Admin panel now has a new tab “Insight” where you can view Profiles and Segments.

episerver insight - filter profiles

What is the Episerver Profile Store?

The Episerver Profile Store is the brains behind Insights. It is responsible for tracking and storing customer data behaviour. It can also marry up multiple profiles into one based on some algorithm (i.e. a user on multiple devices). It obviously also is where all profile data are stored.

  • Episerver e-Commerce – After enabling Insight and the Profile Store, you can then start implementing tracking to cover behaviours such as viewing a product, adding to cart, placing an order as well as other actions you want tracked. This can be done thru adding an attribute or making an API call. In this post, my example implementation is for a CMS platform. As for e-Commerce, here’s where you can find a sample implementation – https://github.com/episerver/Quicksilver (Thanks to Magnus from Epi for this detail)
  • Episerver CMS – Same concept, you will have to tell the system which parts of the application you want covered and which actions to track. An example implementation could be as easy as decorating your page controllers with a [Track] attribute. It will then begin collecting data on page views for page controllers you have enabled tracking for. See example implementation below.

The Profile Store, as mentioned earlier, is decoupled from Insights because it serves several other Episerver SaaS products such as Reach, Perform, Advance, and Personalised Find, all worth having a look at.

Is it easy to setup?

Pretty much. There are three steps required when enabling Insight and the Profile Store:

  • Install a couple of NuGet packages, listed below
  • Update the web.config with license keys
  • Implement custom tracking (required for CMS, optional for e-Commerce)

NuGet packages

  1. Episerver Profile Store – install the following nuGet packages
    • Episerver.Profiles.Client
    • Episerver.Tracking.Cms
  2. Episerver Insight – install nuGet package Episerver.Insight.UI

Update web.config
Assuming you already have the license keys, you’ll need to then replace the values of the following config. If you don’t, you’ll need to contact your Episerver account manager. At the time of this writing, there is no developer portal that allows you to generate one for local use.

<add key="episerver:tracking.Enabled" value="false" />
<add key="episerver:profiles.TrackingApiBaseUrl" value="ChangeThis" />
<add key="episerver:profiles.TrackingApiSubscriptionKey" value="ChangeThis" />
<add key="episerver:profiles.ProfileStoreTrackingEnabled" value="false" />
<add key="episerver:profiles.InsightApiBaseUrl" value="ChangeThis" />
<add key="episerver:profiles.InsightApiSubscriptionKey" value="ChangeThis" />
<add key="episerver:profiles.CloudUIBaseUrl" value="ChangeThis" />
<add key="episerver:tracking.IgnoreDNT" value="true" />

Implement custom tracking 

There are several ways to implement custom tracking:

  • The quick way – Using the package you installed earlier Episerver.Tracking.Cms, decorate your page controllers with [Tracking("MyPageTypeName")]. This will then start tracking your page views.
  • The “I’m in control” way – Using the other package you installed earlier, Episerver.Tracking.Core, you will then need to implement a few things:
    • Create a custom event (i.e. PageViewEvent, FormSubmissionEvent, DownloadedEvent)
      public class PageViewEvent
         public string PageTypeName { get; set; }
         public string PageTitle { get; set; }
    • Raise the custom event within your page controllers
      [TemplateDescriptor(Inherited = true)]
      public class DefaultPageController : PageControllerBase<SitePageData>
         private readonly ITrackingService _trackingService;
         private readonly HttpContextBase _httpContextBase;
         public DefaultPageController(ITrackingService trackingService, HttpContextBase httpContextBase)
            _trackingService = trackingService;
            _httpContextBase = httpContextBase;
         public ViewResult Index(SitePageData currentPage)
            // the rest of your code ...
         protected void TrackMe(SitePageData currentPage)
            var trackingData = new TrackingData<PageViewEvent>
               EventType = typeof(PageViewEvent).Name,
               User = new UserData
                  Email = EPiServer.Personalization.EPiServerProfile.Current.Email,
                  Name = EPiServer.Security.PrincipalInfo.CurrentPrincipal.Identity.Name
               Value = "Visited " + _httpContextBase.Request.Url,
               Payload = new PageViewEvent
                  PageTypeName = typeof(SitePageData).Name,
                  PageTitle = currentPage.Name
            _trackingService.Track(trackingData, _httpContextBase);

How long does it take to implement?

The above examples are very basic implementations of Episerver Insight and probably took somewhere around an hour or so to implement. Obviously, you’ll have to sit down with your website stakeholders and properly understand and identify which user behaviours you’d like to be tracked. This could include tracking events such as form submissions, downloaded assets, registrations, contact us events. Implementing such events could take a couple of days to a week of effort, depending on the number of events you have and how complex your site is structured.


The Episerver Profile Store allows you to track and store data about user behaviour on your website. Combined with Episerver Insight, you will then get a visualisation of what the Profile Store has tracked and recorded for you.

Using the collected user behaviour data, your business can then make data-driven decisions, help you build and validate content personalisations, guide you with building smarter campaigns, and hopefully help you increase your revenue too 🙂

Submit your review

Create your own review

Average rating:  
 0 reviews

Add a Comment

Your email address will not be published. Required fields are marked *