OpenReplay Tracker Vuex plugin
A Vuex plugin for OpenReplay Tracker. This plugin allows you to see the application state during session replay.
Installation
npm i @openreplay/tracker-vuex
Usage
Initialize the @openreplay/tracker
package as usual and load the plugin into it.
Then put the generated plugin into your plugins
field of your store.
import Vuex from 'vuex'
import Tracker from '@openreplay/tracker';
import trackerVuex from '@openreplay/tracker-vuex';
const tracker = new Tracker({
projectKey: YOUR_PROJECT_KEY,
});
const store = new Vuex.Store({
plugins: [tracker.plugin(trackerVuex())],
});
You can customize the plugin behavior with options to sanitize your data. They are similar to the ones from the standard createLogger
plugin.
trackerVuex({
filter (mutation, state) {
return mutation.type !== "aBlacklistedMutation";
},
transformer (state) {
return state.subTree;
},
mutationTransformer (mutation) {
return mutation.type;
},
})