This package has been deprecated

Author message:

This module is now under the @mapbox namespace: install @mapbox/mapbox-events instead

mapbox-events

0.1.5 • Public • Published

Build Status

Mapbox Events

Send events from the browser to the Mapbox events API.

Each call to push() is batched. Batches are flushed and sent to the server when the size of the batch reaches the flushAt threshold or when the time since the last event was pushed reaches the flushAfter threshold.

Example

var events = require('mapbox-events')({
    token: 'mapbox api token',
    flushAt: 20,
    flushAfter: 10000
});
 
events.push({
    event: 'foo',
    attribute1: 'foo',
    attribute2: 'bar'
});

Readme

Keywords

none

Package Sidebar

Install

npm i mapbox-events

Weekly Downloads

0

Version

0.1.5

License

none

Last publish

Collaborators

  • mapbox-admin