orange-chef-81249
12/13/2023, 6:47 PMfresh-football-47124
fresh-football-47124
astonishing-market-55169
12/13/2023, 7:31 PMfresh-football-47124
fresh-football-47124
astonishing-market-55169
12/13/2023, 7:32 PMfresh-football-47124
astonishing-market-55169
12/13/2023, 7:33 PMfresh-football-47124
fresh-football-47124
fresh-football-47124
astonishing-market-55169
12/13/2023, 7:38 PMfresh-football-47124
astonishing-market-55169
12/13/2023, 7:41 PMfresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
astonishing-market-55169
12/13/2023, 7:53 PMfresh-football-47124
fresh-football-47124
fresh-football-47124
astonishing-market-55169
12/13/2023, 8:22 PMfresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
trackingCallback: function (experiment, result) {
dataLayer.push({
'event': 'experiment_viewed',
'event_category': 'experiment',
'experiment_id': experiment.key,
'variation_id': result.variationId
})
})
fresh-football-47124
astonishing-market-55169
12/14/2023, 10:47 AMfamous-bird-26809
12/14/2023, 12:43 PMorange-chef-81249
12/14/2023, 6:30 PMbrief-honey-45610
12/15/2023, 4:25 PMbrief-honey-45610
12/15/2023, 4:38 PMastonishing-market-55169
12/15/2023, 4:53 PMlet gb = new growthbook.GrowthBook({
apiHost: "<https://cdn.growthbook.io>",
clientKey: "SECRET",
attributes: {
id: gbuuid
},
enableDevMode: true,
subscribeToChanges: true,
trackingCallback: function(experiment, result) {
dataLayer.push({
'event': 'experiment_viewed',
'event_category': 'experiment',
'experiment_id': experiment.key,
'variation_id': result.variationId,
'gb_user_id': gbuuid
})
console.log("Viewed Experiment", {
experimentId: experiment.key,
variationId: result.key
});
}
});
2. For me this is happening with theme preview links and also in the live production version of the theme
3. Yes, because I’m able to see the CSS variations of my experiment (original and V1) and in both cases I’m not able to see the console logs
4. Is my first experiment with Growthbook
5. Yes it’s enabled
6. I’m using this one
7. I mainly followed multiple recommendations based on Growthbook documentation and youtube videosfamous-bird-26809
12/15/2023, 8:29 PMimport { GrowthBook } from '@growthbook/growthbook'
import { setCookieUUID } from '@/composables/useSetCookieUUID'
import { Growthbook } from '@/constants/Growthbook'
export default defineNuxtPlugin(async (nuxtApp) => {
const config = useRuntimeConfig()
let clientId = ''
if (document?.cookie?.indexOf('_ga=') > -1) {
const gaCookie = document.cookie.match(/_ga=(.+?);/)
if (gaCookie) {
clientId = gaCookie[1].split('.').slice(-2).join('.')
}
}
const gb = new GrowthBook({
apiHost: config.public.growthbook.apiHost,
clientKey: config.public.growthbook.clientKey,
attributes: {
id: setCookieUUID(Growthbook.USER_UUID_COOKIE_NAME),
clientId: clientId
},
enableDevMode: process.env.NODE_ENV === 'development',
//here should be real gtm action
trackingCallback: (experiment, result) => {
console.log('Experiment Viewed', {
experimentId: experiment.key,
variationId: result.key
})
}
})
await gb.loadFeatures()
if (process.client && !window._growthbook) {
window._growthbook = gb
}
nuxtApp.provide(
'growthbook',
process.client && window._growthbook ? window._growthbook : null
)
})
orange-chef-81249
12/15/2023, 8:47 PMfresh-football-47124
famous-bird-26809
12/15/2023, 9:09 PM<http://localhost:3000/mieszkania/?boolean-test-feature=1>
with checking in code that flag receives true:
gb.isOn(Growthbook.IS_MAP_ENABLED_FEATURE_FLAG) // returns true
i still cant see any log from trackingCallbackfresh-football-47124
famous-bird-26809
12/15/2023, 9:14 PMfresh-football-47124
fresh-football-47124
famous-bird-26809
12/15/2023, 9:18 PMfresh-football-47124
orange-chef-81249
12/15/2023, 9:23 PMfresh-football-47124
astonishing-market-55169
12/18/2023, 10:07 AMastonishing-market-55169
12/18/2023, 10:07 AMorange-chef-81249
12/18/2023, 9:56 PMfresh-football-47124
astonishing-market-55169
12/19/2023, 10:12 AMfresh-football-47124
fresh-football-47124
astonishing-market-55169
12/20/2023, 10:06 AMfresh-football-47124
orange-chef-81249
12/22/2023, 12:30 AMfresh-football-47124