NTP-9062 | Event Schema Change (#13353)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import { AnalyticsEventNameConstants } from "../../../../common/constants";
|
||||
import {
|
||||
AnalyticsEventNameConstants,
|
||||
AnalyticsFlowNameConstant,
|
||||
} from "../../../../common/constants";
|
||||
import { AnalyticsEvent, CtaData } from "../../../../common/interface";
|
||||
import { BaseScreenProps } from "../../../../common/interface/BaseScreenProps";
|
||||
import { ScreenState } from "../../../../common/screen/BaseScreen";
|
||||
@@ -14,8 +17,14 @@ export interface ComparePlansScreenProps extends BaseScreenProps {
|
||||
export const screenEvents: Partial<Record<ScreenState, AnalyticsEvent>> = {
|
||||
[ScreenState.LOADED]: {
|
||||
name: AnalyticsEventNameConstants.HI_RN_COMPARE_PLAN_PAGE_INIT,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_RN_COMPARE_PLAN,
|
||||
},
|
||||
},
|
||||
[ScreenState.ERROR]: {
|
||||
name: AnalyticsEventNameConstants.HI_RN_COMPARE_PLAN_PAGE_ERROR_VIEW,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_RN_COMPARE_PLAN,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
} from "../../../../common/actions/GenericAction";
|
||||
import {
|
||||
AnalyticsEventNameConstants,
|
||||
AnalyticsFlowNameConstant,
|
||||
ConstantCta,
|
||||
MARKET_BENEFITS_COMPARE_SCREEN,
|
||||
} from "../../../../common/constants";
|
||||
@@ -25,10 +26,10 @@ import { ScreenData } from "../../../../common/interface/widgets/screenData/Scre
|
||||
import { ScreenState } from "../../../../common/screen/BaseScreen";
|
||||
import { ScreenActionTypes } from "../../../../common/screen/ScreenActionTypes";
|
||||
import { globalHandleClick } from "../../../../common/utilities/NavigationUtil";
|
||||
import { commonStyles } from "../../Styles";
|
||||
import ComparePlanShimmerScreen from "../compare-plan-screen/shimmer-screen/ComparePlanShimmerScreen";
|
||||
import QuoteOfferErrorScreen from "../quote-offer-screen/error-screen/QuoteOfferErrorScreen";
|
||||
import styles from "./MarketBenefitCompareScreenStyles";
|
||||
import { commonStyles } from "../../Styles";
|
||||
const MarketBenefitCompareScreen = ({
|
||||
ctaData,
|
||||
screenData,
|
||||
@@ -74,12 +75,18 @@ const MarketBenefitCompareScreen = ({
|
||||
case ScreenState.LOADED:
|
||||
const initEvent: AnalyticsEvent = {
|
||||
name: AnalyticsEventNameConstants.HI_RN_BENEFIT_COMPARE_PAGE_INIT,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_RN_BENEFIT_COMPARE,
|
||||
},
|
||||
};
|
||||
sendAsAnalyticsEvent(initEvent);
|
||||
break;
|
||||
case ScreenState.ERROR:
|
||||
const errorEvent: AnalyticsEvent = {
|
||||
name: AnalyticsEventNameConstants.HI_RN_BENEFIT_COMPARE_PAGE_ERROR_VIEW,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_RN_BENEFIT_COMPARE,
|
||||
},
|
||||
};
|
||||
sendAsAnalyticsEvent(errorEvent);
|
||||
break;
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
import {
|
||||
ADVERSE,
|
||||
AnalyticsEventNameConstants,
|
||||
AnalyticsFlowNameConstant,
|
||||
ConstantCta,
|
||||
FabTextStyleProperties,
|
||||
HEADER_LOTTIE_TITLE_HEIGHT,
|
||||
@@ -192,12 +193,18 @@ const QuoteOfferScreen = ({
|
||||
case ScreenState.LOADED:
|
||||
const initEvent: AnalyticsEvent = {
|
||||
name: AnalyticsEventNameConstants.HI_RN_QUOTE_PAGE_INIT,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_RN_QUOTE,
|
||||
},
|
||||
};
|
||||
sendAsAnalyticsEvent(initEvent);
|
||||
break;
|
||||
case ScreenState.ERROR:
|
||||
const errorEvent: AnalyticsEvent = {
|
||||
name: AnalyticsEventNameConstants.HI_RN_QUOTE_PAGE_ERROR_VIEW,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_RN_QUOTE,
|
||||
},
|
||||
};
|
||||
sendAsAnalyticsEvent(errorEvent);
|
||||
break;
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
import { AnalyticsEventNameConstants } from "../../../../common/constants";
|
||||
import {
|
||||
AnalyticsEventNameConstants,
|
||||
AnalyticsFlowNameConstant,
|
||||
} from "../../../../common/constants";
|
||||
import { AnalyticsEvent } from "../../../../common/interface";
|
||||
import { ScreenState } from "../../../../common/screen/BaseScreen";
|
||||
|
||||
export const screenEvents: Partial<Record<ScreenState, AnalyticsEvent>> = {
|
||||
[ScreenState.LOADED]: {
|
||||
name: AnalyticsEventNameConstants.HI_RN_WAITING_PERIOD_PAGE_INIT,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_WAITING_PERIOD,
|
||||
},
|
||||
},
|
||||
[ScreenState.ERROR]: {
|
||||
name: AnalyticsEventNameConstants.HI_RN_WAITING_PERIOD_PAGE_ERROR_VIEW,
|
||||
properties: {
|
||||
screen: AnalyticsFlowNameConstant.GI_WAITING_PERIOD,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -33,11 +33,12 @@ export const AnalyticsEventPropertyConstants = {
|
||||
};
|
||||
|
||||
export const AnalyticsFlowNameConstant = {
|
||||
GI_RN_QUOTE: "GiRnQuote",
|
||||
GI_RN_BENEFIT_COMPARE: "GiRnBenefitCompare",
|
||||
GI_WAITING_PERIOD: "GiWaitingPeriod",
|
||||
REACT_NATIVE: "ReactNative",
|
||||
GI_RN_QUOTE: "hi_rn_quote",
|
||||
GI_RN_BENEFIT_COMPARE: "hi_rn_benefit_compare",
|
||||
GI_WAITING_PERIOD: "hi_rn_waiting_period",
|
||||
REACT_NATIVE: "react_native",
|
||||
GI_RN_BENEFIT: "hi_rn_benefit",
|
||||
GI_RN_COMPARE_PLAN: "hi_rn_compare_plan",
|
||||
};
|
||||
|
||||
export const AnalyticsModuleNameConstant = {
|
||||
|
||||
Reference in New Issue
Block a user