redux-tracking-middleware
v1.0.1
Published
Redux Tracking Middleware uses the power of middlewares to enable a simple and robust way to handle action/event tracking in your application.
Downloads
7
Readme
Redux tracking middleware
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/
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 Principles
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))
Documentation and Help
Versioning
To keep better organization of releases we follow the Semantic Versioning 2.0.0 guidelines.
Contributing
Want to contribute? Follow these recommendations.
History
See Releases for detailed changelog.