Hi
Trying to run a simple
gb.isOn("ff-name"); command with a simple HTML tag setup. I wrapped it with growthbook_queue push command like so:
window.growthbook_queue = window.growthbook_queue || [];
window.growthbook_queue.push((gb) => {
if(gb.isOn("ff-name"))
console.log(true);
else
console.log(false);
});
and then I load the SDK
<script async
data-api-host="<https://cdn.growthbook.io>"
data-client-key="sdk-..."
src="<https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/auto.min.js>"
></script>
I'm testing a user that I know for a fact that the app targeted to participate in this feature (meaning the console suppose to print
true). yet when the page loads, the scripts above runs, and the console prints
false. Only when running the same command manually in the console a couple of seconds later the result is back as
true.
I tried to run the code with/without the async script attribute - the results are the same.
Am I missing something here?...