Hello, I have a question about experiments, collec...
# ask-questions
b
Hello, I have a question about experiments, collecting data, metrics and etc. Suppose I set up a string feature flag (variation1, variation2, variation3) and set up an experiment with 33% distribution. Now I check that feature flag value in my C# SKD and route user to one of the variations:
Context context = new()
{
Enabled = true,
Features = [features],
Attributes = attributes
};
GrowthBook.GrowthBook growthBook = new(context);
growthBook.GetFeatureValue(featureName, defaultValue)
To get information about experiment, as I understood I have to set up
TrackingCallback
on
Context
. Something like:
TrackingCallback = (Experiment e, ExperimentResult er) =>
{
if(e.Active && er.InExperiment) // are these check needed?
{
SaveToDb("identifier", e.Key, er.VariationId, DateTime.UtcNow); // how to get identifier?
}
}
Is my understanding of the flow correct? I guess from this callback i have to save data somewhere (e.g. in DB), then connect GB to my db to view experiment resuts. How can i get attributes (e.g. user id)
TrackingCallback
? Can i pass some more data to callback? How can i correlate this data to the result of the user journey variation (e.g. if user did some action at the end of the variation flow)? (edited)