Reduce GA events to stay within limits (#157)
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
3ca9a03a68
commit
8635f8bdee
@ -1,15 +0,0 @@
|
|||||||
import { tap, ignoreElements } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import ga from './';
|
|
||||||
|
|
||||||
export default function analyticsEpic(action$) {
|
|
||||||
return action$.pipe(
|
|
||||||
tap(({ type }) => {
|
|
||||||
ga.event({
|
|
||||||
category: 'Redux Action',
|
|
||||||
action: type
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
ignoreElements()
|
|
||||||
);
|
|
||||||
}
|
|
@ -8,7 +8,6 @@ import { routerReducer as router, routerMiddleware } from 'react-router-redux';
|
|||||||
|
|
||||||
import { reducer as formReducer } from 'redux-form';
|
import { reducer as formReducer } from 'redux-form';
|
||||||
|
|
||||||
import analyticsEpic from '../analytics/analytics-epic';
|
|
||||||
import { reducer as app, epics as appEpics } from './app';
|
import { reducer as app, epics as appEpics } from './app';
|
||||||
import {
|
import {
|
||||||
reducer as challenge,
|
reducer as challenge,
|
||||||
@ -32,7 +31,7 @@ const rootReducer = combineReducers({
|
|||||||
router
|
router
|
||||||
});
|
});
|
||||||
|
|
||||||
const rootEpic = combineEpics(analyticsEpic, ...appEpics, ...challengeEpics);
|
const rootEpic = combineEpics(...appEpics, ...challengeEpics);
|
||||||
|
|
||||||
const epicMiddleware = createEpicMiddleware(rootEpic, {
|
const epicMiddleware = createEpicMiddleware(rootEpic, {
|
||||||
dependencies: {
|
dependencies: {
|
||||||
|
Reference in New Issue
Block a user