Hello,
First of all, thank you for creating Divolte. In just a couple of days I was able to create a simple proof of concept, which is just amazing.
Now, I have a question from the perspective of a new user:
How can I know when it is safe to use divolte.signal? My use case is very simple - I would like to send a custom event as soon as possible after page has loaded. I'm planning to use Google Tag Manager to load divolte asynchronously. I don't know the exact moment when divolte.js will have finished loading, thus I can't know the exact moment after I can start using "divolte.signal" without fear of Javascript errors and/or missing events.
One possible solution that other tagging solutions are using is to define queue as a global variable (e.g. var _divolteQueue = _divolteQueue || [];) even before the actual divolte.js gets loaded and executed. In this solution, events can be fired at any time. It would seem that this would also be a very simple change to the Divolte's source code: instead of initializing SignalQueue to an empty variable, one could initialize it from a global Javascript variable.
What do you guys think about this?
Best regards,
Andris Spruds
P.S.
I do have a couple of unrelated comments/questions related to Divolte's documentation, so let me know if you are also interested to hear about those.