121117 added event triggers

This commit is contained in:
2024-08-29 14:47:22 +01:00
parent afe79b079a
commit c0404d138a
7 changed files with 99 additions and 37 deletions
+12 -4
View File
@@ -7,6 +7,7 @@ import { connect } from "react-redux";
import transLookup from "../../data/lookuptranslations.json";
import { formatDates } from "../utils";
import PaginationControl from "./pagination";
import { sendGAEvent } from "@next/third-parties/google";
import {
getSearchDocumentDetails,
@@ -66,9 +67,6 @@ const DocumentDetails = (props) => {
console.log(currentDate);
var valid = startDate < currentDate && endDate > currentDate;
console.log(valid);
ShowDocLinks = valid;
};
@@ -307,7 +305,17 @@ const DocumentDetails = (props) => {
}
key={key}
onClick={() => {
toggleDownLoadLink(key);
toggleDownLoadLink(key),
sendGAEvent(
"event",
"DownloadedFile",
{
caseReference:
props.caseReference,
filename:
detailsObj.pinswg_name,
}
);
}}
>
<span className="results-visually-hidden">