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

cold-monitor-79007

01/23/2023, 10:22 PM
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?
f

fresh-football-47124

01/23/2023, 10:23 PM
Hi yong- can you share the rules you added to the feature?
Did you add an experiment rule?
c

cold-monitor-79007

01/23/2023, 10:28 PM
Ah - I have not added an experiment rule.
How should I do that?
f

fresh-football-47124

01/23/2023, 10:28 PM
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?
c

cold-monitor-79007

01/24/2023, 11:29 AM
@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?
f

fresh-football-47124

01/24/2023, 3:13 PM
@future-teacher-7046 - do you know why?
f

future-teacher-7046

01/24/2023, 3:21 PM
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
c

cold-monitor-79007

01/24/2023, 4:10 PM
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
f

future-teacher-7046

01/24/2023, 4:17 PM
It looks like you specified a cap of
1
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.
c

cold-monitor-79007

01/24/2023, 4:18 PM
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
3 Views