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

@@ -12,6 +12,7 @@ import moment from "moment";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { INSERT_SCOREBOARD_ENTRY } from "../../graphql/scoreboard.queries";
import { logImEXEvent } from "../../firebase/firebase.utils";
export default function ScoreboardAddButton({ job, ...otherBtnProps }) {
const { t } = useTranslation();
@@ -21,6 +22,8 @@ export default function ScoreboardAddButton({ job, ...otherBtnProps }) {
const [visibility, setVisibility] = useState(false);
const handleFinish = async (values) => {
logImEXEvent("job_close_add_to_scoreboard");
setLoading(true);
const result = await insertScoreboardEntry({
variables: { sbInput: [{ jobid: job.id, ...values }] },