https://www.growthbook.io/ logo
n

nutritious-psychiatrist-11063

02/04/2022, 10:15 AM
Hi everyone, I use inline experiments in a next.js application and wondering whether there is a way to get all the active variations/experiments in the given page. I need to send the list of all active experiments to mixpanel with every tracking event
f

future-teacher-7046

02/04/2022, 10:31 AM
Yes, there is a
getAllResults
method you can use for that. It returns a map indexed by tracking key.
n

nutritious-psychiatrist-11063

02/04/2022, 10:53 AM
Thanks @future-teacher-7046, I assume I need to run it on the growthbook instance, but when trying to get that using this I get an error saying that No useGrowthBook is exported from
@growthbook/growthbook-react
f

future-teacher-7046

02/04/2022, 10:55 AM
Hmm. What version of the react SDK do you have?
n

nutritious-psychiatrist-11063

02/04/2022, 10:57 AM
0.5.0
f

future-teacher-7046

02/04/2022, 10:58 AM
The latest version is 0.7.0. I think that hook was released after 0.5.0
n

nutritious-psychiatrist-11063

02/04/2022, 11:27 AM
Ok, thanks a lot.
getAllResults
does what I need