feat(client): unify GA and add to donation (#37984)
This commit is contained in:
committed by
mrugesh
parent
d07c85151b
commit
78df306707
11
client/src/redux/ga-saga.js
Normal file
11
client/src/redux/ga-saga.js
Normal 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)];
|
||||
}
|
Reference in New Issue
Block a user