# @openreplay/tracker-redux

> Tracker plugin for Redux state recording

Latest version **4.0.1** (published 2025-07-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @openreplay/tracker-redux
pnpm add @openreplay/tracker-redux
yarn add @openreplay/tracker-redux
bun add @openreplay/tracker-redux
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2025-07-31 |
| First published | 2021-04-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 178.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alex Tsokurov |
| Maintainers | shekarsiri, estradino, deliriumvt, tahayk, andreiopenreplay |
| Keywords | redux, logging, replay |

## Links

- npm: https://www.npmjs.com/package/@openreplay/tracker-redux
- npm.io page: https://npm.io/package/@openreplay/tracker-redux

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads

## Recent versions

- 4.0.1 (latest) — 2025-07-31
- 3.6.1-beta.2 (beta) — 2024-04-02
- 4.0.0 — 2024-05-30
- 3.6.1-beta.1 — 2024-04-02
- 3.6.1-beta.0 — 2024-04-02
- 3.5.1 — 2022-09-13
- 3.5.0 — 2022-02-17
- 3.4.8 — 2021-11-29
- 3.0.0 — 2021-04-30

## README

# OpenReplay Tracker Redux plugin

A Redux middleware for OpenReplay Tracker. This middleware allows you to see the application state during session replay.

## Installation

```bash
npm i @openreplay/tracker-redux
```

## Usage

Initialize the `@openreplay/tracker` package as usual and load the plugin into it.
Then put the generated middleware into your Redux chain.

```js
import { applyMiddleware, createStore } from 'redux';
import Tracker from '@openreplay/tracker';
import trackerRedux from '@openreplay/tracker-redux';

const tracker = new Tracker({
  projectKey: YOUR_PROJECT_KEY,
});

const openReplayMiddleware = tracker.use(trackerRedux());

const store = createStore(
  reducer,
  applyMiddleware(openReplayMiddleware),
);
```

You can customize the middleware behavior with options to sanitize your data.

```js
trackerRedux({
  actionFilter: action => action.type !== 'DRAW', // only actions which pass this test will be recorded
  actionTransformer: action => action.type === 'LOGIN' ? null : action,
  actionType: action => action.type // action type for search, that's the default one
  stateTransformer: state => {
    const { jwt, ..._state } = state;
    return _state;
  },
})
```

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