I have been working on a project in EPiServer CMS 7.5 and MVC. In the project we are using visitor groups in order to personalize content for visitors. We have three different visitor groups and each group is triggered in different ways. What we want to do is that a user only should be able to be in one visitor group at time. So if a user is a member of visitor group A and then triggers visitor group B the user should become a member of B and loose the membership of A. The problem is that the visitor groups have different criterions that work in different ways which makes it hard to e g neglect the criterions for A in both B and C.
Is there a way (with coding) to make that a user only can be a member of one visitor group?
I guess this comes down to how you are working out and persisting if someone is a member of a group A,B,C (or not).
For example if you used session to store membership of a visitor group then a single session variable should contain what visitor group they are in (if any). So to work out if visitor is in Visitor Group A, B or C then each Visitor Group should return Session["DistinctGroup"] == "A" for group A, Session["DistinctGroup"] == "B" for group B etc. This approach can work for any temporary or permanent persistence mechansim, whether thats session, cookie or something in the DB etc.
Hope that makes sense.