Added first round of analytics and event tracking BOD-190
This commit is contained in:
@@ -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]: {
|
||||
|
||||
Reference in New Issue
Block a user