This message was deleted.
# give-feedback
w
This message was deleted.
l
We recently installed GrowthBook on an Angular SPA and noticed this too... trackingCallback() is designed to only fire when the user is put into an experiment (once per unique experiment). For example, we're using the trackingCallback to log an "experiment_viewed" event in GA4/Firebase analytics like this:
trackGBExperiment(experiment, result) {
// Track experiment_viewed for GrowthBook integration
const experimentParams = {
event_category: "experiment",
experiment_id: experiment.key,
variation_id: result.variationId,
};
this.track("experiment_viewed", experimentParams);
}
We're just going through implementation now too... others might know better but it seems like this is triggered as part of GrowthBook initialization independently of the "isOn" function. For troubleshooting, I found it helped to test with a new user id in an incognito tab and use the GrowthBook devtools plugin.
441 Views