Four ways today's page goes wrong
The page as the agents read it. Four notes from the runs.
17 of 50The JavaScript tab is the browser SDK. 17 runs copied it into a Node server, where identify, track and getValue don't exist, and the app crashed. With the other tabs removed, crashes fell from 20 of 50 to 1 of 70.
62 of 70Every example uses one fixed identifier. Agents copied the pattern, not the string. With the Node-only page, 62 of 70 apps gave every visitor one identity: 37 used the IP address and 25 a name they made up. Nothing errors, and the test is dead.
2 runsSetting eventProcessorConfig without enableEvents: true throws, in Node.js too. The page says so only under the JavaScript tab, not the Node.js one. 2 Node.js runs hit it.
No lineNothing on the page says what to do when Flagsmith can't be reached.
Run an Experiment
Once an experiment is running, Flagsmith serves the variations automatically through the flag. Your application has two jobs: record exposures, and record conversion events.
Initialise
JavaScriptReactPythonJavaNode.jsGoFlutter
import flagsmith from '@flagsmith/flagsmith';
await flagsmith.init({
environmentID: 'YOUR_CLIENT_SIDE_ENVIRONMENT_KEY',
enableEvents: true,
// eventProcessorConfig: { eventsApiUrl: '…' },
});
await flagsmith.identify('user_42');
eventProcessorConfig requires enableEvents: true; init throws without it. JavaScript tab only
Record exposures
Call the experiment flag method at the point of display. It returns the variation and records an exposure for the identity.
const flag = await flagsmith.getExperimentFlag('checkout_button', 'user_42');
Track conversions
flagsmith.trackEvent('purchase', { identifier: 'user_42', value: 99.5 });
Troubleshooting
No results yet? Check that events are enabled, that the identifier matches between flags and events, and that the metric's event name is spelled the same.
Missing: what to do when Flagsmith can't be reached
Excerpts of docs.flagsmith.com/experimentation/run-an-experiment as converted for the agents on 24 Nov 2026. © Flagsmith, BSD-3-Clause.