Load Segment's analytics.js library asynchronously with method queueing
$ npm install --save load-segment
var Segment = require('load-segment')
var analytics = Segment({key: 'myWriteKey'})
analytics.track('MyEvent')
Returns a queue interface that accumulates calls to Segment while it loads and proxies them once it arrives.
Required
Type: object
Segment configuration. Currently only key
is supported and required.
MIT © Ben Drucker