fix: add donation ga and tests (#38003)
* fix: add donation ga * feat: add ga-saga tests
This commit is contained in:
12
client/src/redux/ga-saga.js
Normal file
12
client/src/redux/ga-saga.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { takeEvery, call, all } from 'redux-saga/effects';
|
||||
import ga from '../analytics';
|
||||
|
||||
const GaTypes = { event: ga.event, page: ga.pageview, modal: ga.modalview };
|
||||
|
||||
function* callGaType({ payload: { type, data } }) {
|
||||
yield call(GaTypes[type], data);
|
||||
}
|
||||
|
||||
export function* createGaSaga(types) {
|
||||
yield all([takeEvery(types.executeGA, callGaType)]);
|
||||
}
|
Reference in New Issue
Block a user