121117 added event triggers
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user