# @logspot/node

> Logspot Node SDK

Latest version **3.1.1** (published 2026-09-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @logspot/node
pnpm add @logspot/node
yarn add @logspot/node
bun add @logspot/node
```

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.1.1 |
| Published | 2026-09-01 |
| First published | 2021-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Logspot |
| Maintainers | logspot |

## Links

- npm: https://www.npmjs.com/package/@logspot/node
- Repository: https://github.com/logspot/logspot-node
- Homepage: https://github.com/logspot/logspot-node#readme
- Issues: https://github.com/logspot/logspot-node/issues
- npm.io page: https://npm.io/package/@logspot/node

## Recent versions

- 3.1.1 (latest) — 2026-09-01
- 3.1.0 — 2026-09-01
- 3.0.0 — 2026-08-06
- 2.2.0 — 2026-08-06
- 2.1.0 — 2023-03-07
- 2.0.4 — 2022-05-28
- 2.0.3 — 2022-05-28
- 2.0.2 — 2022-05-28
- 2.0.1 — 2022-05-15
- 2.0.0 — 2022-05-15
- 1.0.3 — 2022-02-05
- 1.0.2 — 2022-01-02
- 1.0.1 — 2021-11-26
- 1.0.0 — 2021-11-26

## README

# @logspot/node

Logspot Node SDK for Node.js application.

Requires Node.js 18 or newer (uses the built-in `fetch`).

## Installation

```npm install @logspot/node```

or

```yarn add @logspot/node```

## Usage

### Init


```js
import Logspot from '@logspot/node';

Logspot.init({ secretKey: 'YOUR_SECRET_KEY' });
```

### Track

```js
Logspot.track({ 
    event: 'UserSubscribed', 
    notify: true,
    message: 'john@doe.com has subscribed',
    userId: 'john@doe.com', 
    metadata: { additionalData: '123' } 
});
```

### Revenue

Record a payment from your server. `amount` is in **major units** (e.g. dollars).
Pass `transactionId` (your payment/charge id) so re-sending the same payment is
deduped, and `userId` (or any extra props, which become metadata) to attribute it.

```js
Logspot.revenue(29.99, {
    currency: 'USD',
    transactionId: 'ch_123',
    userId: 'john@doe.com',
    plan: 'pro',
});
```

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