Skip to content

Load Segment's analytics.js library asynchronously with method queueing

License

Notifications You must be signed in to change notification settings

hanford/load-segment

 
 

Repository files navigation

load-segment Build Status

Load Segment's analytics.js library asynchronously with method queueing

Install

$ npm install --save load-segment

Usage

var Segment = require('load-segment')

var analytics = Segment({key: 'myWriteKey'})

analytics.track('MyEvent')

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

About

Load Segment's analytics.js library asynchronously with method queueing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%