silly-fall-70535
08/12/2023, 2:44 AMconst growthbook = new GrowthBook({
apiHost: process.env.NEXT_PUBLIC_GROWTHBOOK_API_HOST,
clientKey: process.env.NEXT_PUBLIC_GROWTHBOOK_CLIENT_KEY,
enableDevMode: process.env.NODE_ENV === 'development',
trackingCallback: (experiment, result) => {
console.log('Viewed Experiment', experiment, result);
if ('gtag' in window) {
(window as any).gtag('event', 'experiment_viewed', {
event_category: 'experiment',
experiment_id: experiment.key,
variation_id: result.variationId,
});
} else {
console.warn('no gtag');
}
},
});
locally i get the console log for Viewed Experiment. On Prod I don't get any logs at all... Very strange... The only difference should be enableDevMode (I tested locally the production build...)fresh-football-47124
silly-fall-70535
08/12/2023, 11:35 AMSkip because missing hashAttribute