Configure Evaluation Context
masterContext properties are passed directly to Mixpanel for targeting and bucketing. You can set context globally or per-evaluation.
Note: targetingKey is treated as a standard context property and is not used as a special bucketing key by this provider. Mixpanel's server-side configuration determines which properties are used for targeting.
Global Context
await OpenFeature.setProviderAndWait(provider);
OpenFeature.setContext({ environment: "production" });Per-evaluation Context
Per-evaluation context is merged with and overrides global context.
const value = await client.getBooleanValue("premium-feature", false, {
distinct_id: "user-123",
email: "user@example.com",
plan: "premium",
beta_tester: true,
});// Global
OpenFeature.setContext({ environment: "production" });
// Per-evaluation
const value = await client.getBooleanValue("flag", false, { distinct_id: "123", plan: "premium" });