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