Optimizely Sticky Session
I have just tried Optimizely. The problem is it will show different variations to a user. Sometimes we don't expect this behaviour. For example if I change color to red from blue, Optimizely will randomly select between the orginal (blue) and the variation (red) for the same user which is inconsistent. How can I make Optimizely to always show the same variation to a user?
I am not sure, if i understood you correctly. But one of the main features of optimizely is, that users stay in the same bucket as long as this information is available, which means that he did not clean his cookies and allows cookies in general.
Users are assigned to a variation and that assigmment persists by setting a cookie.
Any time the user returns, it uses that cookie to run the same variation again.
If the cookie disappears, then the user is randomly assigned to a new variation.
The cookie could disappear if the user uses a "Private Browser" or clears their cookies manually.
The cookie will have never existed when they visit from a different browser on the same device or using a new device.
In some instances, depending on the browser, the cookies may disappear when the user insalls the latest version of the browser.
Are you wanting to persist an assignment based on recognizing authenticated users across devices and browsers ?
Analytics and Testing Guru
Experiments have 2 parts, one part is the qualifier and the other part is the variation code. Based on what you are describing, the issue you are running into is that the variation code that changes the button isn't running for some users.
If you are able to replicate the issue, you can access the optimizelyActiveExperiments object to see if the experiment is even active. If it is then you can check if the optimizelyBuckets object is pointing to the correct variation.
If you are in the correct variation that should change the button, then the issue may be related to a timing issue.
The article below will walk you through on how to check the objects I mentioned above and how to work around timing issues: