Try our conversational search powered by Generative AI!

David Buö
Nov 13, 2019
  2062
(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
Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog

The A/A Test: What You Need to Know

Sure, we all know what an A/B test can do. But what is an A/A test? How is it different? With an A/B test, we know that we can take a webpage (our...

Lindsey Rogers | Apr 15, 2024

.Net Core Timezone ID's Windows vs Linux

Hey all, First post here and I would like to talk about Timezone ID's and How Windows and Linux systems use different IDs. We currently run a .NET...

sheider | Apr 15, 2024