swift-rainbow-89901
04/08/2022, 12:14 PMfuture-teacher-7046
const growthbook = new GrowthBook();
for (let i=0; i<50000; i++) {
const email = i + "@gmail.com"; // TODO: pull from CSV
growthbook.setAttributes({
id: email
});
const result = growthbook.run({
key: "my-experiment",
variations: ["A", "B"]
});
sendEmail(email, result.value); // "A" or "B"
}
swift-rainbow-89901
04/08/2022, 1:30 PMExperiment
objects at appropriate places and run the experiment for each user?future-teacher-7046
const growthbook = new GrowthBook({
features: featuresJSONFromCache
})
for (let i=0; i<50000; i++) {
const email = i + "@gmail.com"; // TODO: pull from CSV
growthbook.setAttributes({
id: email
});
const variation = growthbook.getFeatureValue("my-feature", "A")
sendEmail(email, variation);
}
swift-rainbow-89901
04/08/2022, 3:38 PM