feat(client): unify GA and add to donation (#37984)

This commit is contained in:
Ahmad Abdolsaheb
2019-12-31 20:59:32 +03:00
committed by mrugesh
parent d07c85151b
commit 78df306707
18 changed files with 304 additions and 109 deletions

View File

@@ -0,0 +1,11 @@
import { takeEvery } from 'redux-saga/effects';
import ga from '../analytics';
function* callGaType({ payload: { type, data } }) {
const GaTypes = { event: ga.event, page: ga.pageview, modal: ga.modalview };
GaTypes[type](data);
}
export function createGaSaga(types) {
return [takeEvery(types.executeGA, callGaType)];
}