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
+32 -22
View File
@@ -34,6 +34,8 @@ import {
getWatchedCasesProxy,
} from "../../actions";
import { sendGAEvent } from "@next/third-parties/google";
const SearchResults = (props) => {
const {
searchString,
@@ -261,28 +263,36 @@ const SearchResults = (props) => {
}
className="govuk-link--no-underline"
onClick={() => {
setCurrentReference({
"ticketnumber":
item.ticketnumber,
"currentReference":
item.title,
"currentType":
"searchResultsObj",
"incidentid":
item.incidentid,
"appealType":
item.pinswg_appealcasetype,
"showLoginCheck":
props.showLoginCheck,
"specialistProcess":
detailsObj.pinswg_speacialistcaseprocess !=
null ||
detailsObj.pinswg_specialistcaseprocess !=
null
? detailsObj.pinswg_speacialistcaseprocess ||
detailsObj.pinswg_specialistcaseprocess
: "",
});
sendGAEvent(
"event",
"CaseViewed",
{
caseReference:
item.ticketnumber,
}
),
setCurrentReference({
"ticketnumber":
item.ticketnumber,
"currentReference":
item.title,
"currentType":
"searchResultsObj",
"incidentid":
item.incidentid,
"appealType":
item.pinswg_appealcasetype,
"showLoginCheck":
props.showLoginCheck,
"specialistProcess":
detailsObj.pinswg_speacialistcaseprocess !=
null ||
detailsObj.pinswg_specialistcaseprocess !=
null
? detailsObj.pinswg_speacialistcaseprocess ||
detailsObj.pinswg_specialistcaseprocess
: "",
});
}}
>
<span className="results-visually-hidden">