Hi, I am initializing in this way.
app.use(async function (req, res, next) {
// Create a GrowthBook instance and store in the request
req.growthbook = new GrowthBook({
apiHost: "
http://localhost:4100",
clientKey: "my-key",
// Set this to
false
to improve performance in server-side environments
enableDevMode: false,
// Important: make sure this is set to
false
, otherwise features may change in the middle of a request
subscribeToChanges: false,
attributes: {
id: 101,
country: "US"
},
trackingCallback: (experiment, result) => {
// Example using Segment
// console.log("MMM", experiment,result)
// analytics.track("Experiment Viewed", {
// experimentId: experiment.key,
// variationId: result.key,
// });
},
});
// Clean up at the end of the request
res.on("close", () => req.growthbook.destroy());
// Wait for features to load (will be cached in-memory for future requests)
req.growthbook
.loadFeatures()
.then(() => next())
.catch((e) => {
console.error("Failed to load features from GrowthBook", e);
next();
});
});
I just wanted to know where
attributes: {
id: 101,
country: "US"
},
this attribute will store to maintain stickiness?