hi, can someone help me how I can configure GrowthBook in Next Js (server side) properly because I am following this documentation
https://docs.growthbook.io/guide/nextjs-and-growthbook#server-components but the problem is that like this doesn’t work, while if I set an ID like this it works.
.setAttributes({
id: "any id here",
});
const growthbook = new GrowthBook({
apiHost: "...",
clientKey: "...",
enableDevMode: true,
trackingCallback: (experiment, result) => {
// TODO: Use your real analytics tracking system
console.log("Viewed Experiment", {
experimentId: experiment.key,
variationId: result.key,
});
},
});
now this it makes problems because user can see variation 1 and variation 0 if he refreshes or comes back to the same page, I think this is happening because every time I am generating unique ID and I set that id in GrowthBook, for this reason I get this message in GrowthBook