Tags: Optimizely CMS

Finally kill the EPiStateMarker cookie!

In Optimizely CMS 11 the cookie was called EPi:StateMarker, and in CMS 12 it is called EPiStateMarker. Removing this cookie used by VisitorGroups has been considered the holy grail for Optimizely/Episerver developers for years! It has been the kind of problem that makes you wake up screaming in the middle of the night!A screenshot of the cookie EPiStateMarkerWith the release of CMS 12, simply add this line to the ConfigureServices-method in your Startup.cs.

public void ConfigureServices(IServiceCollection services)
{
    ...
    services.Configure<VisitorGroupOptions>(o => { o.EnableSession = true; });
    ...
}

That's it!

Maybe you can go completely cookieless, and get rid of that annoying cookie banner for good!?

Found this post helpful? Help keep this blog ad-free by buying me a coffee! ☕