0.1.23 • Published 8 years ago

snowplow-react-native-tracker v0.1.23

Weekly downloads
514
License
MIT
Repository
github
Last release
8 years ago

Snowplow react native tracker

Snowplow tracker for react and react-native

Snowplow react native tracker works exactly like Snowplow Node.js Tracker because its the base of this package.

The documentation i will provide here will be limited however here you can find extended documentation

Installing

Using npm:

$ npm install snowplow-react-native-tracker --save

Initialization

var snowplow = require('snowplow-react-native-tracker');
var emitter = snowplow.emitter;
var tracker = snowplow.tracker;
First, initialize an emitter instance. This object will be responsible for how and when events are sent to Snowplow.

var e = emitter(
  'myscalastreamcollector.net', // Collector endpoint
  'http', // Optionally specify a method - http is the default
  8080, // Optionally specify a port
  'POST', // Method - defaults to GET
  5, // Only send events once n are buffered. Defaults to 1 for GET requests and 10 for POST requests.
  function (error, body, response) { // Callback called for each request
    if (error) {
      console.log("Request to Scala Stream Collector failed!");
    }
  }
);

Initialise a tracker instance like this:

var t = tracker([e], 'myTracker', 'myApp', false);

You can continue reading the extended documentation for more info.

0.1.23

8 years ago

0.1.22

8 years ago

0.1.21

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.1

8 years ago