This article helps you:
Learn when and when not to use sticky bucketing in your experiments
Confirm if sticky bucketing was used for a specified user
Sticky bucketing ensures that a user will continue to see the same variant even when your experiment’s targeting criteria, percentage rollout, or rollout weights are changed.
Sticky bucketing is often used as a defense mechanism against variant jumping: when a user is exposed to two or more variants for a single flag or experiment. However, simply enabling sticky bucketing does not guarantee that you’ll never see variant jumping. For example, it may still occur if your experiment includes both a logged-out and a logged-in experience, since a user may have a different Amplitude ID when they are logged in versus not.
Amplitude Experiment uses consistent bucketing and a deterministic hashing algorithm, which keeps users bucketed into their original variants as long as you don’t change anything.
To turn sticky bucketing on or off, open your experiment and navigate to Bucketing > Delivery Settings. Click the edit icon, then Advanced (Optional) in the left sidebar. Here you'll find the sticky bucketing toggle.
When sticky bucketing is enabled, Amplitude Experiment checks whether a user already has a value for the user property associated with the experiment. If so, the user is assigned the current value of the user property (the last variant they saw); otherwise, the user is re-evaluated.
If two or more experiment assignments occur within a few seconds of each other, Amplitude Experiment may not have time to apply sticky bucketing.
Users do not get sticky bucketed to the off variant. Learn more about evaluation and exposure with these Amplitude resources: evaluation flow chart, and local evaluation targeting capabilities.
This section provides examples of when to enable sticky bucketing versus when not to. Note that this is not intended to be an exhaustive list. There are also cases where the results would be the same, regardless of whether sticky bucketing was on or off. An example might be an experiment where you’re targeting everyone who views your home page, and you do not touch any of the experiment controls while the experiment is running.
Do not enable sticky bucketing when:
Follow these steps to see if a user was subject to sticky bucketing:
.details
that corresponds to the experiment flag key you are interested in. This will show the version of the flag that was evaluated, and which targeting rule applies to the user. This can also be helpful for debugging assignment issues.For example, the properties above show that the user was assigned to off
for the lp-app-downloads
flag because the device family was not iOS. We also see that this is the 21st version of the flag; the name of the rule applied to them is non-iOS users
; and the user failed the first rule-based targeting filter, so they went to the second one instead.
In this example, sticky bucketing was enabled and the user was bucketed to the 14th version of the signup-ux-updates
flag, where they were served the phone-number-removed
variant. Having the flag version helps with debugging when the flag has been changed. (Remember that the assignment event shows the evaluation for all active flags in that project, but the exposure event is shown on a per-flag basis). If you don’t see an event property corresponding to the flag you’re interested in, check the [Experiment] Environment Name
field and make sure it matches the deployment your flag belongs to.
Thanks for your feedback!
May 21st, 2024
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.