Last active
October 17, 2018 14:36
-
-
Save davidknipe/526e3f3b6586d778ba139601b873dadb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void TrackEmailClick(HttpContextBase httpContext, EPiServer.Tracking.Core.ITrackingService trackingService) | |
{ | |
try | |
{ | |
var email = GetCurrentUserEmail(); | |
// If you know the users name and/or additional information | |
// like company name it's also possible to associate here | |
var userData = new UserData() { Name = email, Email = email }; | |
var trackingData = new TrackingData<object> | |
{ | |
EventType = "EmailAssociated", | |
User = userData, | |
Value = "Associated email with current profile: '" + email + "'" | |
}; | |
trackingService.Track(trackingData, httpContext); | |
} | |
catch | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment