Hi everyone, I'm new to GrowthBook. I have read th...
# ask-questions
g
Hi everyone, I'm new to GrowthBook. I have read the documentation, but I still have a question about
trackingCallback
. Based on the docs, does this event get triggered only once when we create an instance?
f
it will get triggered when a user is placed into an experiment, because of an experiment rule (or inline experiment)
g
But what if I want to fire our event when I click a button? Is there any callback I can use?
f
what event is this? like tracking the button click?
g
Internal event for tracking data. That event will be trigger when I click the button
f
yes, so the way GrowthBook works is that all additional events on clicks or page views or whatever, will be joined by a user attribute (usually an id) to the experiment exposure event, on the experiment report
so you only need to add that one additional event on the trackingCallback, and leave all your other event tracking as you have it
g
Oh I see. Thank you. Going to test it around. Is there any videos about it ?
f
there are a few that give an overview of how it works
but they don’t go in to too much detail
we’d be happy to meet if you run into any trouble or have any questions
g
Thanks! I will check these out👍
b
@fresh-football-47124 what if I want to send the tracking callback only when the user is actually seeing the experiment and not when it gets allocated? I would want to avoid a situation whereby a user gets allocated to an experiment, tracking is sent but during the journey or test duration he/she never actually get to experience the control/variation because for instance doesn't go on the page/app screen where the change is
f
you can use activation metrics for that use case