Introduction

Redux Tracking Middleware uses the power of middlewares to enable a simple and robust way to handle action/event tracking in your application.

https://isaquediasm.gitbook.io/tracking-middleware/arrow-up-right

Motivation

UI Interactions don't often provide enough insights about our application usage. This library allows you to track your meaningful Redux actions, which is specially useful for async actions tracking, such as signup or checkout.

Disclamer: It's not the purpose of this library to cover all the tracking edge cases. You might still need to manually track UI events based on your own needs and use cases.

Read more about the Design Principlesarrow-up-right

Instalation

yarn add redux-tracking-middleware

Setup

Import the middleware, write your configurations and include it in applyMiddleware when creating a Redux Store:

import trackingMiddleware from 'redux-tracking-middleware'
import mixpanel from 'mixpanel'

const defaultTracking = {
  track: action => {
    mixpanel.track(action.type, action.payload)
  }
}

const tracking = trackingMiddleware(defaultTrack)
const store = createStore(
  rootReducer,
  applyMiddleware(tracking.reduxMiddleware)
)

Documentation and Help

Versioning

To keep better organization of releases we follow the Semantic Versioning 2.0.0arrow-up-right guidelines.

Contributing

Want to contribute? Follow these recommendationsarrow-up-right.

History

See Releasesarrow-up-right for detailed changelog.

License

MIT Licensearrow-up-right © Isaque Diasarrow-up-right

Last updated