Rich-text Reply

Optimizely behind login wall without cookie

Spindle 11-25-15

Optimizely behind login wall without cookie

Optimizely isn't running since it's on a website with a login wall. A common answer is to open another tab, login there and restart the app. This additional tab enables the login credentials to be stored in a cookie.


However this particular login doesn't store the values in a cookie. Is there a workaround for this?

Level 1

Re: Optimizely behind login wall without cookie

Hi Spindle, Thanks for your question.


Could you personal-message me the URL and login credentials so I can have a look?



Can you load your page that you logged into in another separate tab? If it loads fine there, then Optimizely should also be able to load it. If it doesn't load fine there, it means that the login information is not stored session-wide, but only for that tab. Then Optimizely will have no way of accessing that login information. My guess is that this is what's happening for you.

If that is the case, we will need to use an alternate method of creating variation code.


  • Create a static page of your webpage. This should contain all the elements that the experiment should change. Then load that page in the Optimizely editor. The way Optimizely works is that the visual editor loads a page used for interaction. Each change made by a visual editor tool generates a line of code that is present within the < edit code > box of the visual editor. URL Targeting will determine which URL(s) this code will run on if a user is bucketed into the specific variation. In this sense, the page loaded into the editor is used as the template to allow for interaction with the visual editor tools. We can take advantage of this knowledge by loading a static page and using URL Targeting to encompass the correct live page where the experiment will occur.
  • Another approach, if you are familiar with jQuery, would be to use the developer console in your browser to make changes and see them reflected on your live page. That jQuery can then be copied into the experiment's variation code.


Both of these methods work since the editor acts as a template, whereas the URL targeting dictates exactly where the experiment will run. The key here is to still be able to use the visual editor to create the desired changes, then utilise URL Targeting to determine where these changes run.



Does this help you?




GaryK 12-21-15

Re: Optimizely behind login wall without cookie

Hi Nils,

I'm experiencing a similar issue, I'm trying to access a shopping cart page which is behind a login wall.

I tried loading the page on a separate tab - didn't work
Loaded the page on the same tab and then loaded the editor in optimizely - Didn't work
I allowed mixed content and tried in - Didn't work

I tried all of the above in Chrome and Firefox, with no luck.

The test I want to setup is quite simple, just tweaking copy on the shopping cart page, so I would prefer if I don't have to ask IT to build me another shopping cart page to split traffic to.

Is there anything else I can try?

Level 2

Re: Optimizely behind login wall without cookie

Hi Andresm,


Can you pm me the URL of the page you're trying to load into the editor, as well as an experiment-ID or project-ID? I'll have a look at it and see what I can find.