angular-segmentio
angular-segmentio copied to clipboard
Make plugin work with segment.io 3.0.0
This code no longer tries to mock the analytics object, because when it happens the mock object doesn't get assigned the 'initialized' property correctly. This is also a deprecated flag in segmentio. Instead it uses the presence of analytics as signal to resend the queue of events and start proxying them to the library.