Episerver Insight allows Episerver to track user journeys by tracking user behaviours. One of the most common requirements when tracking user journeys is to associate them across device. For example when a user signs up for a newsletter on a desktop then subsequently opens the newsletter on a mobile then it should be considered to be the same user journey.

This post describes how to associate different user journeys in Episerver Insight as if it was one journey as long as the email of the user matches.

To do this it’s assumed that a user has signed up for a newsletter or some form of communication and that it ends up with an email being sent to the user. Retrieval of the email address itself is outside the scope of this post but it would be retrieved by the GetCurrentUserEmail() method. The following code will send a tracking event to Insight which will associate the current device to the profile with a matching email address:

The code above should be executed when the user first hits the site after clicking a link in an email. So would likely be executed by checking a querystring variable which can be used to load the user's details from an external source such as a CRM or marketing automation tool and made available in the GetCurrentUserEmail() method.


Recommendations for you