Hi! I am experiencing difficulties configuring the Sticky Bucketing feature via the front end. Despi...
a
Hi! I am experiencing difficulties configuring the Sticky Bucketing feature via the front end. Despite setting up the
stickyBucketService
with a specific prefix for the cookie, the cookie is not being generated as expected. Here is a brief overview of my setup: 1. I imported
BrowserCookieStickyBucketService
from
@growthbook/growthbook
and
Cookies
from
js-cookie
. 2. Created an instance of
BrowserCookieStickyBucketService
with the following configuration: >
const stickyBucketService = new BrowserCookieStickyBucketService({
>
jsCookie: Cookies,
>
prefix: '_iub_gb_sticky_bucket',
>
});
3. Added the
stickyBucketing
option to the GrowthBook configuration: >
window.growthbook = new GrowthBook({
>
...
>
stickyBucketing: stickyBucketService,
>
});
However, when analyzing the page using developer tools, I do not see the expected cookie being generated. Could you please provide guidance on what might be causing this issue or suggest any additional steps I need to follow to properly configure Sticky Bucketing? Thank you for your assistance.
👍 1
h
It looks like you might not be initializing your StickyBucketService properly in the SDK. It should be:
Copy code
new GrowthBook({
  ...
  stickyBucketService: new BrowserCookieStickyBucketService(...)
});
🙌 1
a
What a silly mistake! I confirm that everything works now, thank you very much.
🎉 1