# totango-tracker

> Node JS Totango activities, modules and attributes tracker

Latest version **1.3.0** (published 2026-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install totango-tracker
pnpm add totango-tracker
yarn add totango-tracker
bun add totango-tracker
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2026-05-04 |
| First published | 2015-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | sahar@totango.com |
| Maintainers | totango |
| Keywords | totango, totango-tracker |

## Links

- npm: https://www.npmjs.com/package/totango-tracker
- Repository: https://github.com/totango/totango-tracker
- Homepage: https://github.com/totango/totango-tracker#readme
- Issues: https://github.com/totango/totango-tracker/issues
- npm.io page: https://npm.io/package/totango-tracker

## Dependencies (4)

- [url](https://npm.io/package/url.md) ^0.10.3
- [util](https://npm.io/package/util.md) ^0.10.3
- [axios](https://npm.io/package/axios.md) ^1.7.9
- [querystring](https://npm.io/package/querystring.md) ^0.2.0

## Recent versions

- 1.3.0 (latest) — 2026-05-04
- 1.2.0 — 2024-02-21
- 1.1.3 — 2022-03-27
- 1.1.2 — 2020-10-07
- 1.1.1 — 2019-09-12
- 1.1.0 — 2015-08-03
- 1.0.0 — 2015-07-30

## README

# totango-tracker
The totango-tracker package is a simple Node.JS package, wrapping the [Totango HTTP API](https://totango.zendesk.com/hc/en-us/articles/203639605-Server-Backend-Integration-HTTP-) used to log user-activity events and/or attribute-updates on accounts.

## Installation
```
$ npm install totango-tracker
```

## Usage

### Install the package
```
$ npm install totango-tracker
```

### Create a tracker Instance
```js
//replace XXXX with your unique Totango service id, set the relevant site and add your SDR security token
const tracker = require('totango-tracker')('SP-XXXX-01','{us}/{eu}', 'sdr-token');
```
### Track Activity
```js
tracker.trackActivity(accountId, userId, activity, module, function(err){
    if (err) {
        // handle the error
    }
    else {
        // Success
    }
});

// Example
tracker.trackActivity('YYYYY', 'john@anonymous.com', 'some activity', 'some module', function(err){
    ...
});
```

### Set Account Attribute(s)
```js
tracker.setAccountAttributes(accountId, {
    'Attribute1'    : 'value1',
    'Attribute2'    : 'value2',
    }, function(err) {
         if (err) {
            // handle the error
        }
        else {
            // Success
        }
    }
);
```

### Set User Attribute(s)
```js
tracker.setUserAttributes(accountId, userId, {
    'Attribute1'    : 'value1',
    'Attribute2'    : 'value2',
    }, function(err) {
         if (err) {
            // handle the error
        }
        else {
            // Success
        }
    }
);
```

## License

https://www.totango.com/terms-of-use

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