Hi, I am trying GB out on a PoC, and I've got the ...
# ask-questions
Hi, I am trying GB out on a PoC, and I've got the feature flag working. However, my trackingCallback is never called for some reason. I am also trying using mixpanel to track the events inside the trackingCallback. Hence none of the events are being captured. Am I doing this right?
Hi yong- can you share the rules you added to the feature?
Did you add an experiment rule?
Ah - I have not added an experiment rule.
How should I do that?
Ya, tracking callback is only called when you’re running an experiment
On the feature page, at the bottom, you can add the a/b test rule
Need more help?
@fresh-football-47124 The trackingCallback works now after I publish the feature. Now I have another issue with a metric I defined in mixpanel - the event property is 'event.properties.M1' (integer type); and I can see the M1 values in mixpanel events view. However, in GB, the metric always shows 0 average value. Any idea why?
@future-teacher-7046 - do you know why?
When setting up the metric in GrowthBook, does the event name exactly match what's in Mixpanel? Are able to share a screenshot of the metric configuration in GrowthBook and one of the Mixpanel events that should be included? That might help debug what's going on
Now I have another issue with a numeric metric I defined in mixPanel - the GB generated JQL query is wrong because it returns not the sum of numerical metric values, but rather the number of those value instances. I am able to fix the JQL in a local query which gave the right result. My QUESTION is - how can I upload (or paste) my own JQL script to a MixPanel metric inside GB portal?
@future-teacher-7046 here is the screenshot -
I found the GB-generated JQL has a problem here -
.map(function(user) { // Metric - M1 user.value.metricValue = !user.value.metricValue.length ? 0 : ( (values => sum(values))(user.value.metricValue) ); //user.value.metricValue = user.value.metricValue && Math.min(user.value.metricValue, 1); return user; })
I commented out this line and it works: //user.value.metricValue = user.value.metricValue && Math.min(user.value.metricValue, 1);
the original JQL code counts, but not calc the total of metricValues
It looks like you specified a cap of
for the metric in GrowthBook. If you remove that, it should work as expected.
The cap limits the max value any one user can have. So by setting it to 1, you are in essence turning the sum into a count.
cool - that works now. TY!
I do see the right avg numeric sales amount in the Metric "Info" tab/screen. However, in the "Experiment" -> "Results" page, it shows "no data" for an experiment that uses that metric.
Any idea why? @future-teacher-7046