remote_flags.getVariant() returns value instead of variant identifier
When using remote_flags.getVariant() from the Mixpanel Node.js SDK, the returned data is confusing and seems to lose the variant identifier.
const variant = await mixpanel.remote_flags.getVariant(
'onboarding_cta_icon',
null,
{ distinct_id: userId }
);
console.log(variant);
Output:
{
"variant_key": "🚀",
"variant_value": "🚀",
"experiment_id": "7b21d4f1-9c3a-4a2e-9c19-2c4f1a8c91aa",
"is_experiment_active": true
}
Problem
Both variant_key and variant_value contain the same value "🚀".
This makes it impossible to know which variant the user was assigned to, for example:
- control
- variant_a
- variant_b
- treatment
Expected behavior
variant_key should be a stable variant identifier (control, variant_1, etc.)
variant_value should contain the actual payload/value (string, boolean, JSON, etc.)
Is this the intended behavior or a bug in the SDK?
Environment
- SDK: mixpanel (Node.js)
- Version: 0.19.1
- Feature type: Remote Flags / Experiments
remote_flags.getVariant()returns value instead of variant identifierWhen using
remote_flags.getVariant()from the Mixpanel Node.js SDK, the returned data is confusing and seems to lose the variant identifier.Output:
{ "variant_key": "🚀", "variant_value": "🚀", "experiment_id": "7b21d4f1-9c3a-4a2e-9c19-2c4f1a8c91aa", "is_experiment_active": true }Problem
Both
variant_keyandvariant_valuecontain the same value"🚀".This makes it impossible to know which variant the user was assigned to, for example:
Expected behavior
variant_keyshould be a stable variant identifier (control, variant_1, etc.)variant_valueshould contain the actual payload/value (string, boolean, JSON, etc.)Is this the intended behavior or a bug in the SDK?
Environment