# @snowplow/node-tracker

> Node tracker for Snowplow

Latest version **4.10.3** (published 2026-11-07) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @snowplow/node-tracker
pnpm add @snowplow/node-tracker
yarn add @snowplow/node-tracker
bun add @snowplow/node-tracker
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.10.3 |
| Published | 2026-11-07 |
| First published | 2021-03-23 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 58.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 593 |
| Maintainers | cksnp, snowplow-analytics, cogsp |
| Keywords | snowplow, analytics, tracking, events, open source |

## Links

- npm: https://www.npmjs.com/package/@snowplow/node-tracker
- Repository: https://github.com/snowplow/snowplow-javascript-tracker
- Homepage: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/node-js-tracker/
- Issues: https://github.com/snowplow/snowplow-javascript-tracker/issues
- npm.io page: https://npm.io/package/@snowplow/node-tracker

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.3.1
- [@snowplow/tracker-core](https://npm.io/package/@snowplow/tracker-core.md) 4.10.3

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 4.10.3 (latest) — 2026-11-07
- 4.1.1-dev.2 (react-native) — 2025-01-02
- 4.0.2-dev.1 (create_react_native_tracker) — 2024-11-07
- 4.0.0-beta.4 (next) — 2024-10-22
- 3.13.2-dev.0 (1185-id-service-option) — 2023-07-04
- 3.13.1-dev.0 (add-tracking-scenario-option-to-core) — 2023-06-22
- 4.10.2 — 2026-09-09
- 4.10.1 — 2026-08-19
- 4.10.0 — 2026-07-27
- 4.9.0 — 2026-07-21
- 4.8.4 — 2026-07-02
- 4.8.3 — 2026-06-30
- 4.8.2 — 2026-06-17
- 4.8.1 — 2026-05-13
- 4.8.0 — 2026-04-28
- … 85 more at https://npm.io/package/@snowplow/node-tracker/versions

## README

# 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

---
_Source: https://npm.io/package/@snowplow/node-tracker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
