David Buö
Nov 13, 2019
  2143
(4 votes)

Visitor Group Tracking into Episerver Insight

In August Chris Sharp wrote about the newly released top-level filter for Visitor Groups in Episerver Insight (link to blog). To make use of this filter it requires additional tracking into the Profile Store (underlying datastore for Episerver Insight) with the visitor group information. This blog will show an example of how to track Visitor Groups into Profile Store with similar syntax to the standard [PageViewTracking] attribute on the controller action method, that is included in EPiServer.Tracking.PageView. This content was presented at Episerver Ascend in London.

In order to get started, we need to install the following packages (full documentation here)

  • EPiServer.Tracking.Core. Generic package for all tracking.
  • EPiServer.Tracking.Cms. Base classes for tracking of CMS data.

For a complete tracking of your website, I would also recommend installing the pageview and commerce tracking

  • EPiServer.Tracking.PageView. Native integration for tracking of CMS data.
  • EPiServer.Tracking.Commerce. Native integration for tracking of Commerce data.

To follow the [PageViewTracking] notation I have created a custom [VisitorGroupTracking] that does the following:

  1. Make sure we're not in Edit mode
  2. Get all visitor groups
  3. Check which visitor groups the principal is a member of
    • I will track both member and non-member
  4. Create a tracking event
  5. Send tracking data

Complete source code can be found here.

There was a good discussion at the event around performance, and how often a visitor group should be tracked, and as always I believe that it's worth considering the use case for the tracked visitor group and design the tracking to conform to that. Also, it's a good idea to make sure the tracking isn't affecting your websites customer experience (performance) negatively.

Feel free to provide ideas or comments below, especially if you already have strategies around Visitor Group Tracking.

Nov 13, 2019

Comments

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024