open-index/open-npm huggingface dataset:
npm package: @snowplow/browser-plugin-screen-tracking
Description: Snowplow screen tracking
Author: Peter Perlepes
Latest version: 4.7.0

# Snowplow Screen Tracking Plugin

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Browser Plugin to be used with `@snowplow/browser-tracker`. The plugin is already included in `@snowplow/react-native-tracker`.

This plugin is the recommended way to track screen view events.

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-plugin-snowplow-screen-tracking
```

## Usage

Initialize your tracker with the ScreenTrackingPlugin:

```js
import { newTracker } from '@snowplow/browser-tracker';
import { ScreenTrackingPlugin } from '@snowplow/browser-plugin-screen-tracking';

newTracker('sp1', '{{collector_url}}', { 
   appId: 'my-app-id', 
   plugins: [ ScreenTrackingPlugin() ],
});
```

For a full API reference, you can read the plugin [documentation page](https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/plugins/screen-tracking/).

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-plugin-screen-tracking
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-screen-tracking
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-screen-tracking
npm package: @snowplow/browser-plugin-site-tracking
Description: Site tracking for Snowplow
Author: Paul Boocock
Latest version: 4.7.0

# Snowplow Site Tracking

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Browser Plugin to be used with `@snowplow/browser-tracker`.

Adds site tracking based events to your Snowplow tracking.

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-plugin-site-tracking
```

## Usage

Initialize your tracker with the SiteTrackingPlugin:

```js
import { newTracker } from '@snowplow/browser-tracker';
import { SiteTrackingPlugin } from '@snowplow/browser-plugin-site-tracking';

newTracker('sp1', '{{collector}}', { plugins: [ SiteTrackingPlugin() ] }); // Also stores reference at module level
```

Then use the `trackX` functions from this package to track to all trackers which have been initialized with this plugin:

```js
import { trackSocialInteraction, trackSiteSearch, trackTiming } from '@snowplow/browser-plugin-site-tracking';

trackSocialInteraction({
  action: 'retweet',
  network: 'twitter',
  target: '1234',
});

trackSiteSearch({
  terms: ['unified', 'log'],
  filters: { category: 'books', 'sub-category': 'non-fiction' },
  totalResults: 14,
  pageResults: 8,
});

trackTiming({
  category: 'load',
  variable: 'map_loaded',
  timing: 50,
  label: 'Map loading time',
});
```

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-plugin-ad-tracking
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-ad-tracking
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-ad-tracking
npm package: @snowplow/browser-plugin-snowplow-ecommerce
Description: Snowplow ecommerce tracking
Author: Peter Perlepes
Latest version: 4.7.0

# Snowplow Ecommerce Plugin

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Browser Plugin to be used with `@snowplow/browser-tracker`.

This plugin is the recommended way to track ecommerce events on your store. Functions, usage and a complete setup journey is showcased on the [E-commerce Web Accelerator](https://docs.snowplow.io/accelerators/ecommerce/).

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-plugin-snowplow-ecommerce
```

## Usage

Initialize your tracker with the SnowplowEcommercePlugin:

```js
import { newTracker } from '@snowplow/browser-tracker';
import { SnowplowEcommercePlugin } from '@snowplow/browser-plugin-snowplow-ecommerce';

newTracker('sp1', '{{collector_url}}', { 
   appId: 'my-app-id', 
   plugins: [ SnowplowEcommercePlugin() ],
});
```

For a full API reference, you can read the plugin [documentation page](https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/plugins/snowplow-ecommerce/).

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-plugin-snowplow-ecommerce
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-snowplow-ecommerce
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-snowplow-ecommerce
npm package: @snowplow/browser-plugin-timezone
Description: Attaches timezone to Snowplow events
Author: Paul Boocock
Latest version: 4.7.0

# Snowplow Timezone Tracking

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Browser Plugin to be used with `@snowplow/browser-tracker`.

Adds Timezone information to your Snowplow tracking.

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-plugin-timezone
```

## Usage

Initialize your tracker with the PerformanceTimingPlugin:

```js
import { newTracker } from '@snowplow/browser-tracker';
import { TimezonePlugin } from '@snowplow/browser-plugin-timezone';

newTracker('sp1', '{{collector}}', { plugins: [ TimezonePlugin() ] }); 
```

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-plugin-timezone
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-timezone
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-timezone
npm package: @snowplow/browser-plugin-vimeo-tracking
Description: Vimeo tracking for Snowplow
Author: Snowplow Analytics Ltd
Latest version: 4.7.0

# Snowplow vimeo-tracking Plugin

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Browser Plugin to be used with `@snowplow/browser-tracker`.

This plugin enables automatic tracking of Vimeo videos, utilizing the [Snowplow Media Plugin](https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/plugins/media-tracking/)

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-plugin-vimeo-tracking
```

## Usage

Initialize your tracker with the Vimeo tracking plugin:

```js
import { newTracker } from '@snowplow/browser-tracker';
import { VimeoTrackingPlujgin } from '@snowplow/browser-plugin-vimeo-tracking';

newTracker('sp1', '{{collector_url}}', { 
   appId: 'my-app-id', 
   plugins: [ VimeoTrackingPlugin() ],
});
```

For a full API reference, you can read the plugin [documentation page](https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/plugins/vimeo-tracking/).

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2023 Snowplow Analytics Ltd.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-plugin-vimeo-tracking
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-vimeo-tracking
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-vimeo-tracking
npm package: @snowplow/browser-plugin-web-vitals
Description: Adds the capability to track web performance metrics categorized as Web Vitals.
Author: Snowplow Analytics Ltd
Latest version: 4.7.0

# Snowplow Web Vitals Tracking

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Browser Plugin to be used with `@snowplow/browser-tracker`.

The plugin adds the capability to track web performance metrics categorized as [Web Vitals](https://web.dev/vitals/). These metrics are tracked with an event based on the [web_vitals schema](https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/web_vitals/jsonschema/).

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-plugin-web-vitals
```

## Usage

Initialize your tracker with the `WebVitalsPlugin`:

```js
import { newTracker } from '@snowplow/browser-tracker';
import { WebVitalsPlugin } from '@snowplow/browser-plugin-web-vitals';

newTracker('sp1', '{{collector}}', { plugins: [ WebVitalsPlugin(/* pluginOptions */) ] });

/* 
 * Available plugin options `WebVitalsPluginOptions`:
 * {
 *  loadWebVitalsScript: Should the plugin immediately load the Core Web Vitals measurement script from UNPKG CDN.
 *  webVitalsSource: The URL endpoint the Web Vitals script should be loaded from. Defaults to the UNPKG CDN.
 *  context: Array of entity objects or entity-generating functions (the web_vitals payload is passed as a parameter) to attach to the web_vitals event.
 * }
 */
```

### Choosing a Web Vitals measurement source

The default Web Vitals measurement script is loaded from the [UNPKG](https://www.unpkg.com/) CDN. This choice is chosen as a default but you should consider your own setup when choosing the script source. Selecting a script source from a CDN which might already be used in your website might save you from yet another connection startup time (_Queueing_,_DNS lookup_,_TCP_, _SSL_).

Another reasonable choice could be [jsDelivr](https://cdn.jsdelivr.net/npm/web-vitals@3/dist/web-vitals.iife.js).

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2023 Snowplow Analytics Ltd.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-plugin-web-vitals
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-web-vitals
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-web-vitals
npm package: @snowplow/browser-plugin-webview
Description: Automatically forwards events to Snowplow mobile trackers running in a WebView.
Author: Snowplow Analytics Ltd
Latest version: 4.7.0

# Snowplow WebView Plugin

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Browser Plugin to be used with `@snowplow/browser-tracker`.

This plugin is for use in WebViews. It forwards the events to the Snowplow Android, iOS, or React Native trackers via the [Snowplow WebView tracker](https://github.com/snowplow-incubator/snowplow-webview-tracker).

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-plugin-webview
```

## Usage

Initialize your tracker with the `WebViewPlugin`:

```js
import { newTracker } from '@snowplow/browser-tracker';
import { WebViewPlugin } from '@snowplow/browser-plugin-webview';

newTracker('sp1', '{{collector_url}}', {
   appId: 'my-app-id',
   plugins: [ WebViewPlugin() ],
});
```

For a full API reference, you can read the plugin [documentation page](https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/plugins/webview/).

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2024 Snowplow Analytics Ltd.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-plugin-webview
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-plugin-webview
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-plugin-webview
npm package: @snowplow/browser-tracker
Description: Browser tracker for Snowplow
Latest version: 4.7.0

# Snowplow Browser Tracker

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Add Snowplow Tracking to your Web Application with `@snowplow/browser-tracker`.  

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-tracker
```

## Usage

Initialize your tracker with your desired configuration and optional plugins:

```js
import { newTracker } from '@snowplow/browser-tracker';
import { SiteTrackingPlugin } from '@snowplow/browser-plugin-site-tracking';
import { PerformanceTimingPlugin } from '@snowplow/browser-plugin-performance-timing';
import { ClientHintsPlugin } from '@snowplow/browser-plugin-client-hints';
import { FormTrackingPlugin, enableFormTracking } from '@snowplow/browser-plugin-form-tracking';

newTracker('sp1', '{{collector}}', { plugins: [ PerformanceTimingPlugin(), SiteTrackingPlugin(), ClientHintsPlugin(), FormTrackingPlugin() ] }); // Also stores reference at module level
newTracker('sp2', '{{collector}}', { plugins: [ PerformanceTimingPlugin(), SiteTrackingPlugin() ] }); // You can have multiple trackers with different configs!

enableFormTracking() // Switch on form tracking

```

Then use the `trackX` functions from this package and your plugins to track to all trackers which have been initialized, or select just some trackers:

```js
import { trackPageView } from '@snowplow/browser-tracker';
import { trackSocialInteraction } from '@snowplow/browser-plugin-site-tracking';

trackPageView({}, ['sp1']); // Just to `sp1`

// OR to all trackers with some extra context!
trackPageView({
  title: 'My Title',
  context: [
    {
      schema: 'iglu:org.schema/WebPage/jsonschema/1-0-0',
      data: {
        keywords: ['tester'],
      },
    },
  ],
});

// Use your plugin track methods too
trackSocialInteraction({
  action: 'retweet',
  network: 'twitter',
  target: '1234',
});


```

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-tracker
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-tracker
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-tracker
npm package: @snowplow/browser-tracker-core
Description: Core functionality for Snowplow Browser trackers
Author: Paul Boocock
Latest version: 4.7.0

# Snowplow Browser Tracker Core

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Browser Core module to be used by Snowplow Browser based trackers.

It should rarely be used alone, you probably want `@snowplow/browser-tracker`.

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

### Building Browser Tracker Core

```bash
cd libraries/browser-tracker-core
rushx build
```

### Running tests

```bash
rushx test
```

## Package Installation

With npm:

```bash
npm install @snowplow/browser-tracker-core
```

## Usage

```js
import { addTracker, createSharedState, getTracker } from '@snowplow/browser-tracker-core';

const sharedState = createSharedState();
const tracker = addTracker('snowplow_sp1', 'sp1', 'js-3.0.0', '{{collector}}', sharedState, {}); // Also stores reference at module level
const sameTracker = getTracker('snowplow_sp1');
```

### Example

```js
const domainUserId = tracker.getDomainUserId();
```

## Other features

This package contains a number of helper functions for tracking events in the browser as well as the core functionality of the Snowplow JavaScript Tracker.

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/tracker-core
[npm-image]: https://img.shields.io/npm/v/@snowplow/tracker-core
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/browser-tracker-core
npm package: @snowplow/javascript-tracker
Description: Web analytics for Snowplow
Latest version: 4.7.0

# Snowplow JavaScript Tracker

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Add Snowplow Tracking to your website via a tag solution.

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Select your version

This repository creates two versions of the tracker. 

The fully featured `sp.js` contains the majority of the plugins included within this repository for a complete tracking experience. This is our recommended version.

However, if you'd like a lightweight version of the tracker you can opt for `sp.lite.js`.  
This version only includes Page Views, Page Activity, Structured and Self Describing events as well as global contexts and anonymous tracking.

## Installation

Add the tag to your website or Tag Management solution:

```html
<script type="text/javascript" async=1>
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","{{URL to sp.js}}","snowplow"));
</script>

<script>
window.snowplow('newTracker', 'sp', collector_endpoint, {
  appId: 'my-app',
  eventMethod: 'post',
  contexts: {
    performanceTiming: true,
  },
});
</script>
```

We advise you host `sp.js` or `sp.lite.js` yourself, and rename it. However if you'd like use a CDN, you'll find the tracker on jsDelivr, unpkg and cdnjs.

## Usage

```js
window.snowplow('enableLinkClickTracking');

window.snowplow('trackPageView', {
  title: 'My Title',
  context: [
    // Set page title; add page context
    {
      schema: 'iglu:org.schema/WebPage/jsonschema/1-0-0',
      data: {
        keywords: ['tester'],
      },
    },
  ],
});

window.snowplow('trackSelfDescribingEvent', {
  event: {
    schema: 'iglu:com.acme/my_event/jsonschema/1-0-0',
    data: {
      myId: '12345-abc',
    },
  }
});
```

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang.

All rights reserved.

[npm-url]: https://www.npmjs.com/package/@snowplow/browser-tracker
[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-tracker
[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/
[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/javascript-tracker
npm package: @snowplow/node-tracker
Description: Node tracker for Snowplow
Latest version: 4.7.0

# Snowplow Node Tracker

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Add Snowplow Tracking to your Node.js Application with `@snowplow/node-tracker`.  

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Package Installation

With npm:

```bash
npm install @snowplow/node-tracker
```

## Usage

Initialize your tracker with your desired configuration:

```js
import { newTracker } from '@snowplow/node-tracker';
const t = newTracker(
  { namespace: 'myTracker', appId: 'myApp', encodeBase64: false }, 
  { endpoint:  'collector.mydomain.net', port: 8080, bufferSize: 5 }
);
```

Then use the `track` function from this package, along with the `buildX` functions to send events to your configured emitters:

```js
import {
  buildSelfDescribingEvent,
  buildPageView
} from '@snowplow/node-tracker';

const context = [
  {
    schema: 'iglu:com.acme/user/jsonschema/1-0-0',
    data: {
      type: 'tester',
    },
  },
];

t.track(
  buildPageView({ pageUrl: 'http://www.example.com', pageTitle: 'example page', referrer: 'http://google.com' }),
  context
);

const eventJson = {
  schema: 'iglu:com.acme/viewed_product/jsonschema/1-0-0',
  data: {
    price: 20,
  },
};

t.track(buildSelfDescribingEvent({ event: eventJson }), context);
```

To enable success and failure callback debugging, run your application with `NODE_DEBUG=snowplow`.

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd.

All rights reserved.

[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/node-tracker
[npm-url]: https://www.npmjs.com/package/@snowplow/node-tracker
[npm-image]: https://img.shields.io/npm/v/@snowplow/node-tracker
npm package: @snowplow/react-native-tracker
Description: React Native tracker for Snowplow
Latest version: 4.7.0

# Snowplow React Native Tracker

[![npm version][npm-image]][npm-url]
[![License][license-image]](LICENSE)

Add Snowplow Tracking to your React Native Application with `@snowplow/react-native-tracker`.

## Package Installation

With npm:

```bash
npm install @snowplow/react-native-tracker
```

## Usage

Initialize your tracker with your desired configuration:

```js
import { newTracker } from '@snowplow/react-native-tracker';
const t = newTracker({
  namespace: 'myTracker',
  appId: 'myApp',
  endpoint: 'http://0.0.0.0:9090'
});
```

Then use the `track` function from this package, along with the `buildX` functions to send events to your configured emitters:

```js
const context = [
  {
    schema: 'iglu:com.acme/user/jsonschema/1-0-0',
    data: {
      type: 'tester',
    },
  },
];

t.trackScreenViewEvent({ name: 'myScreenName' });

t.trackPageView(
  { pageUrl: 'http://www.example.com', pageTitle: 'example page' },
  context
);

const eventJson = {
  schema: 'iglu:com.acme/viewed_product/jsonschema/1-0-0',
  data: {
    price: 20,
  },
};

t.trackSelfDescribingEvent(eventJson, context);
```

## Maintainer quick start

Part of the Snowplow JavaScript Tracker monorepo.  
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

### Setup repository

```bash
npm install -g @microsoft/rush 
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
```

## Find out more

| Technical Docs                    | Setup Guide                 |
|-----------------------------------|-----------------------------|
| [![i1][techdocs-image]][techdocs] | [![i2][setup-image]][setup] |
| [Technical Docs][techdocs]        | [Setup Guide][setup]        |

## Copyright and license

Licensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).

Copyright (c) 2022 Snowplow Analytics Ltd.

All rights reserved.

[osi]: https://opensource.org/licenses/BSD-3-Clause
[license-image]: https://img.shields.io/npm/l/@snowplow/node-tracker
[npm-url]: https://www.npmjs.com/package/@snowplow/node-tracker
[npm-image]: https://img.shields.io/npm/v/@snowplow/node-tracker

[techdocs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/react-native-tracker/introduction
[techdocs-image]: https://d3i6fms1cm1j0i.cloudfront.net/github/images/techdocs.png
[setup]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/react-native-tracker/quick-start-guide/
[setup-image]: https://d3i6fms1cm1j0i.cloudfront.net/github/images/setup.png