Added first round of analytics and event tracking BOD-190

This commit is contained in:
Patrick Fic
2020-07-17 08:27:28 -07:00
parent 3f0394760a
commit a54a85b96c
73 changed files with 433 additions and 208 deletions

View File

@@ -1,4 +1,5 @@
import ModalsActionTypes from "./modals.types";
import { logImEXEvent } from "../../firebase/firebase.utils";
const baseModal = {
visible: false,
@@ -24,6 +25,7 @@ const INITIAL_STATE = {
const modalsReducer = (state = INITIAL_STATE, action) => {
switch (action.type) {
case ModalsActionTypes.TOGGLE_MODAL_VISIBLE:
logImEXEvent("redux_toggle_modal_visible", { modal: action.payload });
return {
...state,
[action.payload]: {
@@ -32,6 +34,8 @@ const modalsReducer = (state = INITIAL_STATE, action) => {
},
};
case ModalsActionTypes.SET_MODAL_CONTEXT:
logImEXEvent("redux_set_modal_context", { modal: action.payload.modal });
return {
...state,
[action.payload.modal]: {