Optimizely Examples

New User Session

On first page load the user will be new. For some time (currently set to 60mins) we treat user as a returning user.


To test: We use local storage key `user-session-start-time` to store the time the session started. Remove 60 mins from this date time to simulate a returning user.

  • flag key:
    onyx-6241
  •     
  • experiment
    displayed?
  •     
  • matches
    audience?
  •     
  • variations:
    (click to force)
  •     

user context:
  • is-user-new-session: undefined



Default Banner


EITHER... the user matches the audience and has been placed in the control group
OR... the user does not match the audience


Click the "Clear user cookie" button in the menu above to be treated as a new user