Reduce GA events to stay within limits (#157)

This commit is contained in:
Stuart Taylor
2018-06-06 17:48:14 +01:00
committed by Mrugesh Mohapatra
parent 3ca9a03a68
commit 8635f8bdee
2 changed files with 1 additions and 17 deletions

View File

@ -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()
);
}

View File

@ -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: {