Hi,
Is there a way to assign a variation yourself to a new user, when initializing the GrowthBook instance on the client side?
Some background:
We use A/B testing on static pages with Next.js. When a static page is requested, the user is sent to the correct variation based on the attribute.id that is sent in the request headers with a cookie. When there is no cookie, then we let GrowthBook pick a variation in the middleware and sent the new attribute.id to the user with the cookies.
Only we have a problem that when a user lands on our site for the first time, they first have to consent for cookies before we are allowed to use the cookies. We can still choose a random variant in the middleware. In the client-side we know the experiment variation that the user sees, but we don't have the cookie, so we need a way to assign the variation in the GrowthBook instance ourselfs instead of GrowthBook choosing for us.