https://www.growthbook.io/ logo
#announcements
Title
# announcements
b

brief-football-97996

04/05/2023, 5:28 PM
Hey team, I’m running into a scenario where
trackingCallback
is called on every page load, therefore firing our tracking event for every user on every page regardless if they’re entering an experiment. We are using nextjs 13. We have devised a plan to set their status in localstorage, but I thought that
trackingCallback
was only supposed to be called when a user was being placed in an experiment. Is there anything that I’m missing here?
@fresh-football-47124 @future-teacher-7046 any thoughts here?
f

fresh-football-47124

04/06/2023, 5:18 PM
Is the experiment running across multiple pages?
b

brief-football-97996

04/06/2023, 5:19 PM
Yes, but shouldn’t it only fire when the user enters it originally?
f

fresh-football-47124

04/06/2023, 5:20 PM
We will fire it for all exposure events, and correct for this on the analytics side
b

brief-football-97996

04/06/2023, 5:21 PM
Gotcha, so it’s up to us to persist that experiment data and not call this event?
f

fresh-football-47124

04/06/2023, 5:21 PM
But you can check for some local storage and not fire the tracking call if you like
b

brief-football-97996

04/06/2023, 5:22 PM
Yeah, it’s redundant and eating through our tracking calls unnecessarily
10 Views