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

@@ -7,6 +7,7 @@ import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { INSERT_APPOINTMENT } from "../../graphql/appointments.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { logImEXEvent } from "../../firebase/firebase.utils";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -22,10 +23,10 @@ export function ScheduleBlockDay({ date, children, refetch, bodyshop }) {
const handleMenu = async (e) => {
e.domEvent.stopPropagation();
console.log("date", date);
if (e.key === "block") {
console.log("Block.");
const blockAppt = {
title: t("appointments.labels.blocked"),
@@ -35,7 +36,8 @@ export function ScheduleBlockDay({ date, children, refetch, bodyshop }) {
start: moment(date).startOf("day"),
end: moment(date).endOf("day"),
};
console.log("handleMenu -> blockAppt", blockAppt);
logImEXEvent("dashboard_change_layout");
const result = await insertBlock({
variables: { app: [blockAppt] },