A huge sought-after feature of this library is being able to load the segment library asynchronously. This is especially important when Segment loads in a whole bunch of scripts and doesn't handle page load events correctly (especially in SPAs).
Angulartics core library solved this issue by adding wait-for-vendor
. This method of initialization will queue events if the analytics library in question (segment in this case) hasn't loaded yet. This allows you to load the library whenever you want while still retaining the events.
Check out the Wait for Vendor section over here: https://github.com/angulartics/angulartics#creating-your-own-vendor-plugin
We have now added this feature to this library.
Enjoy!