Not sure where to ask this but we're experiencing ...
# experimentation
v
Not sure where to ask this but we're experiencing some unexpected behaviour when running experiments and attempting to use the
tracking
callbacks the
GrowthBook-Swift
SDK provides. We have set up a new project with 3 feature flags and only one experiment with 2 variations. The problem we're seeing is that the variation names (that are set in GrowthBook Web admin GUI) are not being sent to the SDK as seen in the network response and making it rather hard to track the experiment (see
$.features['tempad-locations-search'].rules[*].meta[*]
objects missing `name`: https://private-user-images.githubusercontent.com/1733327/500902721-28f50209-5a17-4fc6-9a13-a64a9[…]QifQ.tr7ayPWTywtOlAUXGCJ1KUDqpcfRIEmW4IFWgJ90yQk Full description here - https://github.com/growthbook/growthbook-swift/issues/132
l
I'm just curious, do you specifically need the name over the variation ID?
v
Is it the ‘ID’ though? Is it the ID that is coming through the response? Key as it is named in the response could be a name such as the key of the experiment eg “initial-aa-experiment”, could it not? None of our two variations set a string of “0” and “1”. Where are they coming from? Variation key ‘0’ and ‘1’ don’t mean much with no other info of which value/variation they relate to. Could be any? If it’s a Boolean then it may (or may not) relate to the bool value, but then again we’re getting a key as string…, could be the our first variation is set to ‘true’ and 2nd variation set to ‘false’ and that then doesn’t match the bool values that the variations carry and we can keep guessing. It’s just not clear what that variation key actually is since there’s no clear indication what the variation key is assigned to in the admin gui (as evident from the screenshots provided in the github issue). If that was clear there could be a way around it. But without context it’s quite useless.
l
it is 0, 1, 2, 3.... (0 and 1 for most cases, but 2, 3 etc for multi variant testing),
that's my best understanding,
b
@little-toothbrush-24705 Our problem is one of verification. Consider the three related values from the swift API here • variationId: "The array index of the assigned variation" • key: "The unique key for the assigned variation" • name: "The human-readable name of the assigned variation" Referring to our experiment setup (image below ), we'd expect • variationId: 0, or 1 • key: Unknown • name: "Control - xx", or "Variation - xx" What we actually see is • variationId: 0, or 1 • key: "0", or "1" • name: nil Our verification problem is around what the 0, or 1 actually represents; We assume from the UI that 0 refers to "Control - xx" here and 1 refers to "Variation - xx", however we don't actually know that's the case, as the name always comes back with nil As a user of the SDK, we assume that variationId: 0 always refers to "Control - xx", however to confirm that, we need to see the name come through
l
got it, do you see the variation name in the api response?
v
IMG_0289.png
l
this means what you're looking for might not be possible at all, you might get "0" and "1" but not the "variation 1" and "control", because it'd not be possible for SDK to determine which is "variation 1" and which is "control" since we could easily change that in the UI 😐
b
Given that it's in the SDK, in our expectation, it should return whatever has been set in the UI. I agree with you that the SDK should not try and guess which one is the Control and which one is Variant, etc
l
I'm not a contributor of growthbook so someone should probably help you, what I meant here is that since API response doesn't contain variation and control strings, the current SDK literally can't expose this value, so either I'm thinking maybe the connection is using old version or it's not meant to be 🙂