0.1.23 • Published 10 years ago

snowplow-react-native-tracker v0.1.23

Weekly downloads
514
License
MIT
Repository
github
Last release
10 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

10 years ago

0.1.22

10 years ago

0.1.21

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.1

10 years ago