Hi everyone. I’ve been implementing GrowthBook in ...
# ask-questions
Hi everyone. I’ve been implementing GrowthBook in a Nuxt project (basically following the Vue instructions), using G4A as a data source. I am still working locally but so far so good - I have features set up on GB and these are coming through fine, and also metrics set up that reporting data from G4A via Big Query. I’ve set up an experiment based on a feature, but have not got any data back yet. As far as I can see (in Big Query), no data has come through from G4A yet - specifically the ‘experiment_viewed’ event. I wanted to check if I had understood the tracking callback correctly, am I missing anything here that would stop my experiment tracking correctly? This is the instantiation of GB I have:
growthBook = new GrowthBook({
trackingCallback: (experiment, result) => {
// track using GA4
Vue.$gtag.event('experiment_viewed', {
event_category: 'experiment',
experiment_id: experiment.key,
variation_id: result.variationId,
I am still figuring all this out so may well have missed something important. Any help appreciated.
That looks correct
you could add some debugging there to make sure that the tracking callback is being fired
does the feature have an AB test rule attached?
Thanks @fresh-football-47124 the feature has an experiment attached, which is 50/50 split based on the feature being true/false (as I understand it)
Good idea on the debugging, I will try that
Presumably if it is working there should be events with event_name of ‘experiment_viewed’ in the analytics queries?
Great, thanks for your help