TP-71465 | Crash fixes
This commit is contained in:
@@ -1001,6 +1001,15 @@ export const CLICKSTREAM_EVENT_NAMES = {
|
||||
description: 'FA_COPY_ADDRESS_CLICKED',
|
||||
},
|
||||
|
||||
MS_CLARITY_INITIALIZED: {
|
||||
name: 'MS_CLARITY_INITIALIZED',
|
||||
description: 'MS_CLARITY_INITIALIZED',
|
||||
},
|
||||
LITMUS_EXPERIMENT: {
|
||||
name: 'LITMUS_EXPERIMENT',
|
||||
description: 'LITMUS_EXPERIMENT'
|
||||
},
|
||||
|
||||
//FEE WAIVE CLICKSTREAM EVENTS
|
||||
FA_WAIVE_PREVIOUS_EMI_SCREEN_LOADED: {
|
||||
name: 'FA_WAIVE_PREVIOUS_EMI_SCREEN_LOADED',
|
||||
|
||||
@@ -393,6 +393,9 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
|
||||
);
|
||||
|
||||
if (MS_CLARITY_PROJECT_ID && !GLOBAL.MS_CLARITY_INITIALIZED && msClarityResponse) {
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.MS_CLARITY_INITIALIZED, {
|
||||
deviceId: GLOBAL.DEVICE_ID,
|
||||
});
|
||||
initialize(MS_CLARITY_PROJECT_ID);
|
||||
GLOBAL.MS_CLARITY_INITIALIZED = true;
|
||||
}
|
||||
|
||||
@@ -32,11 +32,12 @@ import getLitmusExperimentResult, {
|
||||
LitmusExperimentName,
|
||||
LitmusExperimentNameMap,
|
||||
} from '@services/litmusExperiments.service';
|
||||
import { LocalStorageKeys } from '@common/Constants';
|
||||
import { CLICKSTREAM_EVENT_NAMES, LocalStorageKeys } from '@common/Constants';
|
||||
import ModalWrapperForAlfredV2 from '@common/ModalWrapperForAlfredV2';
|
||||
import IdCardApproved from '@screens/AgentIdCard/IdCardStatus/IdCardApproved';
|
||||
import { MS_CLARITY_PROJECT_ID } from '@constants/config';
|
||||
import { initialize } from 'react-native-clarity';
|
||||
import { addClickstreamEvent } from '@services/clickstreamEventService';
|
||||
|
||||
function AuthRouter() {
|
||||
const dispatch = useAppDispatch();
|
||||
@@ -147,6 +148,7 @@ function AuthRouter() {
|
||||
deviceId: deviceId,
|
||||
}).then((response) => {
|
||||
if (MS_CLARITY_PROJECT_ID && !GLOBAL.MS_CLARITY_INITIALIZED && response) {
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.MS_CLARITY_INITIALIZED, { deviceId });
|
||||
initialize(MS_CLARITY_PROJECT_ID);
|
||||
GLOBAL.MS_CLARITY_INITIALIZED = true;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { LITMUS_URL } from '@common/Constants';
|
||||
import { CLICKSTREAM_EVENT_NAMES, LITMUS_URL } from '@common/Constants';
|
||||
import { GenericObject } from '@common/GenericTypes';
|
||||
import axiosInstance from '@components/utlis/apiHelper';
|
||||
import { logError } from '@components/utlis/errorUtils';
|
||||
import { addClickstreamEvent } from './clickstreamEventService';
|
||||
|
||||
export enum LitmusExperimentName {
|
||||
COSMOS_TRACKING_COMPONENT_V2 = 'cosmos_tracking_component_v2',
|
||||
@@ -30,6 +31,11 @@ const getLitmusExperimentResult = async (
|
||||
...stickynessConfig,
|
||||
},
|
||||
});
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.LITMUS_EXPERIMENT, {
|
||||
experimentName,
|
||||
result: response.data?.result,
|
||||
deviceId: stickynessConfig?.deviceId,
|
||||
});
|
||||
return response.data?.result || false;
|
||||
} catch (error) {
|
||||
logError(error as Error, 'litmus experiment error');
|
||||
|
||||
Reference in New Issue
Block a user