https://www.growthbook.io/ logo
c

clean-river-69825

03/23/2023, 7:36 AM
Hey team! Is it possible to expose the variant name for tracking purposes? While variant IDs are useful and can be used as a fallback, having a more descriptive identifier in our data warehouse would be beneficial. Would you be interested in this? If so, I can take a deeper look into the codebase and open a pull request.
👀 1
f

fresh-football-47124

03/23/2023, 7:36 AM
Hi David
Thats cool if you want to take a look at the code and open a PR. @future-teacher-7046 might have some thoughts as we’ve had this request in the past, I just don’t remember where we landed.
c

clean-river-69825

03/23/2023, 8:07 AM
Nice! I’ll wait a bit to have some input from Jeremy before exploring this 😸
f

future-teacher-7046

03/23/2023, 5:22 PM
Hi David. We added support in our javascript SDK recently for this, but have not updated the API endpoints to include these new fields yet.
Specifically, we added a
meta
field to experiment definitions to specify a "key" and "name". We also added a top-level field to specify a "name" for the experiment
Copy code
{
  "name": "My Experiment",
  "variations": [
    "A",
    "B"
  ],
  "meta": [
    {
      "key": "my-control-id",
      "name": "Control"
    },
    {
      "key": "my-variation-key",
      "name": "New Page"
    }
  ]
}
Then, in the tracking callback, you can reference these properties:
Copy code
function trackingCallback(experiment, result) {
  console.log(
    experiment.name,
    // The assigned variation metadata
    result.key,
    result.name
  )
}
c

clean-river-69825

03/24/2023, 11:53 AM
Ah, cool, found the docs now https://docs.growthbook.io/lib/js#meta-info 😄
Let me know if you need some help to introduce this in the Ruby SDK 💎
f

fresh-football-47124

03/24/2023, 3:51 PM
That would be great if you wanted to make a PR to add that to the Ruby SDK
c

clean-river-69825

03/28/2023, 12:57 PM
BTW, when do you plan to add all the meta fields in the UI? I am planning to use them in our upcoming integration but I am not sure if they will be available soon.
f

fresh-football-47124

03/28/2023, 2:56 PM
Meta fields for features or experiments?
c

clean-river-69825

03/29/2023, 5:47 AM
I mean the meta fields for features, as well as exposing the variant name. Despite the JS SDK is ready to support this, we don’t yet have this information coming when fetching the config file.
Hey! Just to double check that I understood the goal of this meta fields correctly. Currently are only available for inline experiments, but are you planning to include them in the UI for regular experiments?
f

future-teacher-7046

04/05/2023, 1:52 PM
Yes, we plan to let you opt-in to including meta fields in the payload sent to the SDKs. Some companies don't want to expose detailed information about the experiments they are running to their users, so we didn't want to just enable this for everyone. Hoping to have this opt-in setting available in the next couple weeks
👍 1
c

clean-river-69825

04/10/2023, 12:57 PM
I tried to update the Ruby SDK to match the last spec. Let me know if I’m missing something else 🙏
🎉 1
f

fresh-football-47124

04/10/2023, 12:58 PM
Oh nice! We’ll take a look
2 Views