I am trying to get a hold of which Visitor Group is active. The ultimate goal is to send it as a dimension to Google Analytics. First step here though is just to see if I can catch which Visitor Group is triggered. On my front page I currently have a test Visitor Group that is always triggered so that is the one I am expecting to see.
I can get my visitor groups via this:
var visitorGroup = new VisitorGroupStore(this.DataStore, ServiceLocator.Current.GetInstance<ISynchronizedObjectInstanceCache>()).List();
This show me all (5) visitor groups that I have made. I am now missing the link on how to see if a visitor group is active or not.
I am wondering if "PrincipalInfo" somehow should be used here?
I have a controller with a method that returns me a partial view with a string model that hopefully will contain the active visitor group(s).
Is there any of you that can point me in the right direction?