I've only tried the sticky bucketing solutions that use cookies, BTW. I think the sticky bucketing could work with the redis solution, but that is more challenging to set up.
h
happy-autumn-40938
05/06/2025, 3:42 PM
The Express SB service should work in theory, provided you have access to cookies and a stable user id. It might get a bit more complicated if you’re doing hybrid testing with SSR/CSR or using RSCs. Could you tell us a bit more about your setup?
p
prehistoric-horse-37258
05/06/2025, 7:36 PM
This is an app router page. We do have the next js middleware, but the issue is that NextJS does not allow us to return cookies unless it's a server action or an api call that will return the cookies.
prehistoric-horse-37258
05/06/2025, 7:37 PM
We eval the experiment in the server-side page, then I don't understand how we can use the sticky bucket service to set and return the cookies to the browser.
h
happy-autumn-40938
05/06/2025, 7:38 PM
ah, yeah I see the problem. We don't have a Next-friendly component-level sticky bucket service partly due to this issue. One thing you could do however is create a component that injects a <script> onto the DOM which sets the cookie from the client.