Good day Team!
I have to duplicate the question once again: I encountered with a following problem: the company's website loads not immediately, but during 4-5 seconds (sometimes even more). The reason of that falls not within the scope of my issue. But it seems like it leads to the fact, that _experiment_viewed_ event is pushed to the datalayer only after
Window Loaded event was pushed. Therefore, user almost always just browses to the next page before
Window Loaded event was pushed and there is no _experiment_viewed_ at all. It is clearly illustrated on a screenshot below
The SDK was connected via HTML tag + GTM, so the advice (
https://docs.growthbook.io/faq#how-do-i-make-my-own-identifier) i already implemented. So to implement SDK, i added only one tag in GTM:
<script>
var script = document.createElement('script');
script.async = true;
script.setAttribute('data-api-host', '<https://api-gb.susp.io>');
script.setAttribute('data-client-key', 'sdk-xxxx');
script.src = "<https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/auto.min.js>";
document.getElementsByTagName('head')[0].appendChild(script);
</script>
Can anybody recommends anything to trigger event earlier please?