Added first round of analytics and event tracking BOD-190
This commit is contained in:
@@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
|
||||
import axios from "axios";
|
||||
import { useMutation } from "@apollo/react-hooks";
|
||||
import { DELETE_DOCUMENT } from "../../graphql/documents.queries";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
|
||||
export default function JobsDocumentsDeleteButton({
|
||||
galleryImages,
|
||||
@@ -13,6 +14,8 @@ export default function JobsDocumentsDeleteButton({
|
||||
const [deleteDocument] = useMutation(DELETE_DOCUMENT);
|
||||
const imagesToDelete = galleryImages.filter((image) => image.isSelected);
|
||||
const handleDelete = () => {
|
||||
logImEXEvent("job_documents_delete", { count: imagesToDelete.length });
|
||||
|
||||
imagesToDelete.forEach((image) => {
|
||||
let timestamp = Math.floor(Date.now() / 1000);
|
||||
let public_id = image.key;
|
||||
|
||||
Reference in New Issue
Block a user