NTP-46717 | Events instrumentation (#15361)
This commit is contained in:
committed by
GitHub
parent
3cfe3d7e24
commit
f26c2c09d4
@@ -15,6 +15,8 @@ import { CtaData } from "../../../../common/interface";
|
||||
import { ScreenData } from "../../../../common/interface/widgets/screenData/ScreenData";
|
||||
import { globalHandleClick } from "../../../../common/utilities/NavigationUtil";
|
||||
import { styles } from "./QuoteApologyScreenStyle";
|
||||
import { useAnalyticsEvent } from "../../../../common/hooks";
|
||||
import { screenEvents } from "./types";
|
||||
|
||||
const QuoteApologyScreen = ({
|
||||
ctaData,
|
||||
@@ -25,6 +27,8 @@ const QuoteApologyScreen = ({
|
||||
screenData: ScreenData | null;
|
||||
handleActions: (screenPayload?: GenericActionPayload) => void;
|
||||
}) => {
|
||||
const { sendAsAnalyticsEvent } = useAnalyticsEvent();
|
||||
sendAsAnalyticsEvent(screenEvents);
|
||||
const navigation = useNavigation();
|
||||
const handleClick = (cta?: CtaData) => {
|
||||
globalHandleClick(navigation, cta, QUOTE_APOLOGY_SCREEN);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import {
|
||||
AnalyticsEventNameConstants,
|
||||
AnalyticsFlowNameConstant,
|
||||
} from "../../../../common/constants";
|
||||
import { AnalyticsEvent } from "../../../../common/interface";
|
||||
import { ScreenState } from "../../../../common/screen/BaseScreen";
|
||||
|
||||
export const screenEvents: AnalyticsEvent = {
|
||||
name: AnalyticsEventNameConstants.HI_RN_QUOTE_APOLOGY_PAGE_INIT,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_RN_QUOTE,
|
||||
},
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
export const AnalyticsEventNameConstants = {
|
||||
HI_SI_PILLS_CLICK: "hi_si_pills_click",
|
||||
HI_RN_QUOTE_PAGE_INIT: "hi_rn_quote_page_init",
|
||||
HI_RN_QUOTE_APOLOGY_PAGE_INIT: "hi_rn_quote_apology_page_init",
|
||||
HI_RN_GRATIFICATION_SCREEN_INIT: "hi_pre_quote_generating_screen_init",
|
||||
HI_RN_QUOTE_PAGE_ERROR_VIEW: "hi_rn_quote_page_error_view",
|
||||
HI_RN_BENEFIT_COMPARE_PAGE_INIT: "hi_rn_benefit_compare_page_init",
|
||||
|
||||
Reference in New Issue
Block a user