I am a developer for a script which needs to integrate with segment to track events.
Our script, installed in the page head, regularly loads before segment, even when segment is installed in the main app bundle via npm.
Our script relies on queueing the ready function to the snippet window.analytics array in order to know when the segment analytics sdk is ready to provide user identity (anonymous id, user id, traits) and track events. If the segment sdk is installed via npm (no snippet/function queue) then functions queued to the global are not called by default.
I understand we can't always rely on the global being set and named analytics, but it'd be useful to be able to initialize the npm installed instance with an option to read a function queue from a global.
Happy to answer any questions if something is not clear.
TL;DR I'd like to request the ability to configure a global function queue to read from when initializing the SDK installed via npm.