NTP-46717 | Events instrumentation (#15361)

This commit is contained in:
Kshitij Pramod Ghongadi
2025-03-12 14:37:32 +05:30
committed by GitHub
parent 3cfe3d7e24
commit f26c2c09d4
5 changed files with 34 additions and 0 deletions

View File

@@ -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);

View File

@@ -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,
},
};

View File

@@ -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",