https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
c

colossal-beard-78764

10/30/2023, 2:49 AM
Hello,trackingCallback only fires when i call isOn or getFeatureValue, Is this a normal situation?
1
r

rhythmic-agent-34208

10/30/2023, 2:49 AM
@blue-sundown-32899 has marked the issue as closed. Reopen Issue button
f

fresh-football-47124

10/30/2023, 9:09 AM
It will fire for both of those if the feature includes an experiment
but yes, it should only fire when a feature is evaluated
c

colossal-beard-78764

10/30/2023, 10:22 AM
i call isOn the first time trackingCallback fire, the second time i call isOn ,it dose not fire?
image.png
f

fresh-football-47124

10/30/2023, 10:29 AM
I’m not sure about calling it twice for the same feature, I’d have to check the code to see if it checks for that
I imagine it may just fire it twice - what does it do if you run that?
c

colossal-beard-78764

10/30/2023, 10:44 AM
only fire once
growthbook.isOn('test-bool-feature-1025') growthbook.getFeatureValue("test-json-feature-1025", "{}") two features like above , also fired once
b

brief-honey-45610

10/31/2023, 5:53 PM
Hello, I wanted to check in on this question you asked. Were you able to resolve it?
r

rhythmic-agent-34208

11/02/2023, 3:08 PM
Hello, I'll close this ticket now, but if you need to re-open it for this same issue simply reply in the thread. Thanks!
c

colossal-beard-78764

12/01/2023, 12:28 AM
has not been resolved
f

fresh-football-47124

12/01/2023, 12:28 AM
same issue?
we do some caching, so firing once is fine
c

colossal-beard-78764

12/01/2023, 12:31 AM
my website is spa framework,spa maybe is the root cause
f

fresh-football-47124

12/01/2023, 12:32 AM
we work fine with single page apps - is the feature not updating correctly or are you concerned about the tracking callback event?
c

colossal-beard-78764

12/01/2023, 12:34 AM
I have double checked.firing when open website the first time or reload website
f

fresh-football-47124

12/01/2023, 9:10 PM
are you targeting features that are page dependent? if so you may need to add a useEffect hook
15 Views