@tap-payments/auth-jsconnect 2.8.48-development → 2.8.49-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/build/@types/app.d.ts +1 -0
  2. package/build/features/app/bank/bankStore.js +7 -1
  3. package/build/features/app/brand/brandStore.js +7 -1
  4. package/build/features/app/business/businessStore.js +7 -1
  5. package/build/features/app/connectExpress/connectExpressStore.js +8 -1
  6. package/build/features/app/entity/entityStore.js +7 -1
  7. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +13 -1
  8. package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +7 -1
  9. package/build/features/bank/screens/BankDetails/BankDetails.js +7 -1
  10. package/build/features/brand/screens/BrandActivities/BrandActivities.js +11 -2
  11. package/build/features/brand/screens/BrandInfo/BrandInfo.js +7 -1
  12. package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +11 -2
  13. package/build/features/business/screens/Activities/Activities.js +11 -2
  14. package/build/features/business/screens/BusinessType/BusinessType.js +9 -1
  15. package/build/features/business/screens/Customers/Customers.js +11 -2
  16. package/build/features/business/screens/IDBOD/IDBOD.js +9 -1
  17. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +12 -1
  18. package/build/features/business/screens/Verify/Verify.js +12 -2
  19. package/build/features/connect/Connect.js +3 -2
  20. package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +7 -1
  21. package/build/features/connect/screens/Mobile/Mobile.js +10 -7
  22. package/build/features/connectExpress/ConnectExpress.js +2 -1
  23. package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +7 -1
  24. package/build/features/connectExpress/screens/Mobile/Mobile.js +8 -1
  25. package/build/features/entity/screens/EntityCapital/EntityCapital.js +11 -2
  26. package/build/features/entity/screens/EntityName/EntityName.js +7 -1
  27. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +9 -1
  28. package/build/features/individual/screens/IndividualList/IndividualList.js +7 -0
  29. package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +15 -1
  30. package/build/features/shared/Button/FlowsButtons.js +10 -1
  31. package/package.json +1 -1
@@ -659,6 +659,7 @@ export interface EventPageTrackingData extends CommonDataLayer {
659
659
  }
660
660
  export interface PageTrackingData {
661
661
  title?: string;
662
+ connect_flow?: string;
662
663
  }
663
664
  export type VerifyExpressTokenParams = {
664
665
  public_key: string;
@@ -51,7 +51,7 @@ import API from '../../../api';
51
51
  import { DocumentPurpose, FlowsTypes } from '../../../@types';
52
52
  import { handleCurrentActiveScreen, handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
53
53
  import { BANK_STEP_NAMES } from '../../../constants';
54
- import { hasNoneEditableValue, isStringHasOneAsterisk, retrieveIndividualData, sleep } from '../../../utils';
54
+ import { hasNoneEditableValue, isStringHasOneAsterisk, retrieveIndividualData, sendCustomEventToGTM, sleep } from '../../../utils';
55
55
  export var verifyLeadToken = createAsyncThunk('bankVerifyLeadToken', function (_a, thunkApi) {
56
56
  var token = _a.token, isInternally = _a.isInternally;
57
57
  return __awaiter(void 0, void 0, void 0, function () {
@@ -334,6 +334,12 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardBankSuccess', funct
334
334
  return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
335
335
  case 1:
336
336
  data = _p.sent();
337
+ sendCustomEventToGTM({
338
+ event: 'Send Event',
339
+ event_category: 'Board Flows - Wallet',
340
+ event_action: 'Wallet Update Success Page',
341
+ event_label: settings.data.businessCountry.iso2
342
+ });
337
343
  if (!showBoard && mode === 'content') {
338
344
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
339
345
  (_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
@@ -62,7 +62,7 @@ import API from '../../../api';
62
62
  import { FlowsTypes } from '../../../@types';
63
63
  import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
64
64
  import { BRAND_STEP_NAMES, EXPECTED_SALES_LIST } from '../../../constants';
65
- import { hasNoneEditableValue, isKW, isTwitter, isWebsite, mapSalesChannel, retrieveIndividualData, sleep } from '../../../utils';
65
+ import { hasNoneEditableValue, isKW, isTwitter, isWebsite, mapSalesChannel, retrieveIndividualData, sendCustomEventToGTM, sleep } from '../../../utils';
66
66
  export var verifyLeadToken = createAsyncThunk('brand/verifyLeadToken', function (_a, thunkApi) {
67
67
  var token = _a.token, isInternally = _a.isInternally;
68
68
  return __awaiter(void 0, void 0, void 0, function () {
@@ -546,6 +546,12 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardBrandSuccess', func
546
546
  return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
547
547
  case 1:
548
548
  data = _p.sent();
549
+ sendCustomEventToGTM({
550
+ event: 'Send Event',
551
+ event_category: 'Board Flows - Brand',
552
+ event_action: 'Brand Update Success Page',
553
+ event_label: settings.data.businessCountry.iso2
554
+ });
549
555
  if (!showBoard && mode === 'content') {
550
556
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
551
557
  (_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
@@ -59,7 +59,7 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
59
59
  import API from '../../../api';
60
60
  import { BusinessType, FlowsTypes, DocumentPurpose, LicenseType } from '../../../@types';
61
61
  import { BUSINESS_STEP_NAMES, EXPECTED_SALES_LIST, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_ENTITY_LICENSE, OTHER_FL_LICENSE } from '../../../constants';
62
- import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue } from '../../../utils';
62
+ import { convertNumbers2English, hasKey, sleep, isKW, isSA, dateFormat, isOtherLicense, isOtherThanKWOrSA, hasNoneEditableValue, sendCustomEventToGTM } from '../../../utils';
63
63
  import { handleNextScreenStep, handlePublicKey, handleSetCountryByIso2 } from '../../../app/settings';
64
64
  export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
65
65
  var payload, data, publicKey, countryIso2, boardData, brandData, isicActivityList, leadData, _a, steps, brand, board_id, business_id, entity, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted, list, list;
@@ -759,6 +759,12 @@ export var updateLeadSuccess = createAsyncThunk('businessUpdateLeadSuccess', fun
759
759
  return [4, API.leadService.updateLead(payload)];
760
760
  case 1:
761
761
  data = _g.sent();
762
+ sendCustomEventToGTM({
763
+ event: 'Send Event',
764
+ event_category: 'Account Creation Flow',
765
+ event_action: 'Account Creation Success',
766
+ event_label: settings.data.businessCountry.iso2
767
+ });
762
768
  board_id = data === null || data === void 0 ? void 0 : data.board_id;
763
769
  if (!board_id) return [3, 4];
764
770
  return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
@@ -61,7 +61,7 @@ import { FlowsTypes, AuthForType, BusinessType, LicenseType } from '../../../@ty
61
61
  import API from '../../../api';
62
62
  import { ADD_NEW_ENTITY, CONNECT_EXPRESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE, SCOPE_AUTH } from '../../../constants';
63
63
  import { defaultCountry } from '../../../constants';
64
- import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA } from '../../../utils';
64
+ import { getIndividualName, capitalizeTheFirstLetterOfEachWord, sleep, findCountryByIddPrefix, concatenateObjectValues, isSA, isKW, isOtherThanKWOrSA, sendCustomEventToGTM } from '../../../utils';
65
65
  export var updateBusinessCountryAsync = createAsyncThunk('connectExpress/updateBusinessCountryAsync', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
66
66
  var connectExpress, payload, data;
67
67
  return __generator(this, function (_a) {
@@ -909,6 +909,13 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
909
909
  accountData = _v.sent();
910
910
  _v.label = 4;
911
911
  case 4:
912
+ sendCustomEventToGTM({
913
+ event: 'Send Event',
914
+ event_category: 'User Registration Flow',
915
+ event_action: 'Registration Completed',
916
+ event_label: 'Product Type',
917
+ event_value: leadId
918
+ });
912
919
  (_m = (_l = settings.data.appConfig).onCreated) === null || _m === void 0 ? void 0 : _m.call(_l, accountData);
913
920
  (_p = (_o = settings.data.appConfig).onFlowCompleted) === null || _p === void 0 ? void 0 : _p.call(_o, accountData);
914
921
  (_r = (_q = settings.data.appConfig).onStepCompleted) === null || _r === void 0 ? void 0 : _r.call(_q, settings.data.activeScreen.name, accountData);
@@ -63,7 +63,7 @@ import { BusinessType, DocumentPurpose, FlowsTypes, LicenseType } from '../../..
63
63
  import { handleNextScreenStep, handlePrevScreenStep, handlePublicKey, handleSetCountryByIso2, onCloseComplete } from '../../../app/settings';
64
64
  import { ENTITY_STEP_NAMES } from '../../../constants';
65
65
  import moment from 'moment';
66
- import { convertNumbers2English, getRecentDocumentBasedOnPurpose, hasVerifiedValue, hasNoneEditableValue, sleep, formatNumberAsCurrency, removeAllCharsFromNumber, retrieveIndividualData } from '../../../utils';
66
+ import { convertNumbers2English, getRecentDocumentBasedOnPurpose, hasVerifiedValue, hasNoneEditableValue, sleep, formatNumberAsCurrency, removeAllCharsFromNumber, retrieveIndividualData, sendCustomEventToGTM } from '../../../utils';
67
67
  export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (_a, thunkApi) {
68
68
  var token = _a.token, isInternally = _a.isInternally;
69
69
  return __awaiter(void 0, void 0, void 0, function () {
@@ -425,6 +425,12 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', fun
425
425
  return [4, API.boardService.updateBoardInfo(__assign({ id: board_id, infoId: infoId }, payload))];
426
426
  case 1:
427
427
  data = _p.sent();
428
+ sendCustomEventToGTM({
429
+ event: 'Send Event',
430
+ event_category: 'Board Flows - Entity',
431
+ event_action: 'Entity Update Success Page',
432
+ event_label: settings.data.businessCountry.iso2
433
+ });
428
434
  if (!showBoard && mode === 'content') {
429
435
  (_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
430
436
  (_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, { data: data });
@@ -17,7 +17,7 @@ import { handleNextScreenStep, settingsSelector } from '../../../../app/settings
17
17
  import { resetStore } from '../../../app/auth/authStore';
18
18
  import { AbsherButton, MobileButton } from '../../../shared/Button';
19
19
  import { ScreenContainer } from '../../../shared/Containers';
20
- import { isKW, isSA } from '../../../../utils';
20
+ import { isKW, isSA, sendCustomEventToGTM } from '../../../../utils';
21
21
  import { ICONS_NAMES } from '../../../../constants';
22
22
  var AuthSwitch = function (_a) {
23
23
  var dispatch = useAppDispatch();
@@ -35,9 +35,21 @@ var AuthSwitch = function (_a) {
35
35
  dispatch(handleNextScreenStep('AUTH_EMAIL_STEP'));
36
36
  };
37
37
  var onOpenNID = function () {
38
+ sendCustomEventToGTM({
39
+ event: 'Send Event',
40
+ event_category: 'User Registration Flow',
41
+ event_action: 'Abser Click',
42
+ event_label: data.businessCountry.iso2
43
+ });
38
44
  dispatch(handleNextScreenStep('AUTH_NID_STEP'));
39
45
  };
40
46
  var onOpenPACI = function () {
47
+ sendCustomEventToGTM({
48
+ event: 'Send Event',
49
+ event_category: 'User Registration Flow',
50
+ event_action: 'PACI Click',
51
+ event_label: data.businessCountry.iso2
52
+ });
41
53
  dispatch(handleNextScreenStep('AUTH_CIVIL_ID_STEP'));
42
54
  };
43
55
  return (_jsxs(ScreenContainer, { children: [_jsx(MobileButton, __assign({ sx: { mt: 2.5 }, onClick: function () { return onOpenMobile(); } }, { children: t('mobile_button_label') })), _jsx(MobileButton, __assign({ onClick: function () { return onOpenEmail(); }, icon: ICONS_NAMES.email_icon }, { children: t('email_button_label') })), isKWCountry ? (_jsx(MobileButton, __assign({ onClick: function () { return onOpenPACI(); }, icon: ICONS_NAMES.PACI_ICON }, { children: t('paci_button_label') }))) : (isSACountry && _jsx(AbsherButton, __assign({ onClick: function () { return onOpenNID(); } }, { children: t('absher_button_label') })))] }));
@@ -52,7 +52,7 @@ import { useAppSelector, useAppDispatch, useLanguage } from '../../../../hooks';
52
52
  import { ScreenContainer } from '../../../shared/Containers';
53
53
  import BusinessCountry from '../../../shared/BusinessCountry';
54
54
  import Button from '../../../shared/Button';
55
- import { findCountryByIso2, isSA } from '../../../../utils';
55
+ import { findCountryByIso2, isSA, sendCustomEventToGTM } from '../../../../utils';
56
56
  import Collapse from '../../../../components/Collapse';
57
57
  import { handleNextScreenStep, handleSetCountryByIso2, settingsSelector } from '../../../../app/settings';
58
58
  import { authSelector, updateBusinessCountry, storeIsStartFromBusinessCountry, clearError, resetStore, setMobileCountryCode } from '../../../app/auth/authStore';
@@ -81,6 +81,12 @@ var BusinessCountryScreen = function (_a) {
81
81
  return [2];
82
82
  countryCode = findCountryByIso2(settingsData.countries, iso2);
83
83
  dispatch(handleSetCountryByIso2(iso2));
84
+ sendCustomEventToGTM({
85
+ event: 'Send Event',
86
+ event_category: 'User Registration Flow',
87
+ event_action: 'Country selection page view',
88
+ event_label: iso2
89
+ });
84
90
  if (!data.leadId) return [3, 2];
85
91
  return [4, dispatch(updateBusinessCountry(iso2)).unwrap()];
86
92
  case 1:
@@ -29,7 +29,7 @@ import Form from '../../../../components/Form';
29
29
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
30
30
  import ConfirmPolicy from './ConfirmPolicy';
31
31
  import BankStatement from './BankStatement';
32
- import { deepCopy, getFileDetailsFromDocument, isKW, isStringHasOneAsterisk } from '../../../../utils';
32
+ import { deepCopy, getFileDetailsFromDocument, isKW, isStringHasOneAsterisk, sendCustomEventToGTM } from '../../../../utils';
33
33
  var FormStyled = styled(Form)(function () { return ({
34
34
  display: 'flex',
35
35
  flexDirection: 'column',
@@ -71,6 +71,12 @@ var BankDetails = function () {
71
71
  var t = useTranslation().t;
72
72
  var isAr = useLanguage().isAr;
73
73
  var onBack = function () {
74
+ sendCustomEventToGTM({
75
+ event: 'Send Event',
76
+ event_category: 'Board Flows - Wallet',
77
+ event_action: 'Wallet Details Back button',
78
+ event_label: settingsData.businessCountry.iso2
79
+ });
74
80
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
75
81
  dispatch(handlePrevScreenStep());
76
82
  return;
@@ -20,8 +20,8 @@ import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import { BrandActivitiesValidationSchema } from './validation';
21
21
  import Button from '../../../shared/Button';
22
22
  import { brandSelector, updateBrandActivities } from '../../../app/brand/brandStore';
23
- import { handlePrevScreenStep } from '../../../../app/settings';
24
- import { deepCopy } from '../../../../utils';
23
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
24
+ import { deepCopy, sendCustomEventToGTM } from '../../../../utils';
25
25
  import { useTranslation } from 'react-i18next';
26
26
  import ActivitiesList from './ActivitiesList';
27
27
  import CustomerBase from './CustomerBase';
@@ -39,6 +39,7 @@ var BrandActivities = function (_a) {
39
39
  var _b, _c, _d, _e;
40
40
  var _f = React.useState(), listActive = _f[0], setListActive = _f[1];
41
41
  var dispatch = useAppDispatch();
42
+ var settingsData = useAppSelector(settingsSelector).data;
42
43
  var _g = useAppSelector(brandSelector), data = _g.data, loading = _g.loading, error = _g.error;
43
44
  var _h = data.brandActivities, activities = _h.activities, customerLocations = _h.customerLocations, expectedCustomer = _h.expectedCustomer, expectedSale = _h.expectedSale, termAndConditionChecked = _h.termAndConditionChecked, refundPolicy = _h.refundPolicy, transactionPolicy = _h.transactionPolicy;
44
45
  var ListType;
@@ -48,6 +49,14 @@ var BrandActivities = function (_a) {
48
49
  ListType["ExpectedCustomerList"] = "ExpectedCustomerList";
49
50
  ListType["ExpectedSalesList"] = "ExpectedSalesList";
50
51
  })(ListType || (ListType = {}));
52
+ React.useEffect(function () {
53
+ sendCustomEventToGTM({
54
+ event: 'Send Event',
55
+ event_category: 'Board Flows - Brand',
56
+ event_action: 'Update Brand Activities Details Page',
57
+ event_label: settingsData.businessCountry.iso2
58
+ });
59
+ }, []);
51
60
  var methods = useForm({
52
61
  resolver: yupResolver(BrandActivitiesValidationSchema()),
53
62
  defaultValues: {
@@ -18,7 +18,7 @@ import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, u
18
18
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
19
19
  import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import Form from '../../../../components/Form';
21
- import { deepCopy, mapSalesChannel } from '../../../../utils';
21
+ import { deepCopy, mapSalesChannel, sendCustomEventToGTM } from '../../../../utils';
22
22
  import Button from '../../../shared/Button';
23
23
  import { clearError, brandSelector, updateBrand, retrieveBoardStatus } from '../../../app/brand/brandStore';
24
24
  import { ScreenContainer } from '../../../shared/Containers';
@@ -74,6 +74,12 @@ var BrandInfo = function (_a) {
74
74
  dispatch(updateBrand(formData));
75
75
  };
76
76
  var onBack = function () {
77
+ sendCustomEventToGTM({
78
+ event: 'Send Event',
79
+ event_category: 'Board Flows - Brand',
80
+ event_action: 'Brand Details Back button',
81
+ event_label: settingsData.businessCountry.iso2
82
+ });
77
83
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
78
84
  dispatch(handlePrevScreenStep());
79
85
  return;
@@ -15,11 +15,11 @@ import { useTranslation } from 'react-i18next';
15
15
  import { FormProvider, useForm } from 'react-hook-form';
16
16
  import { styled } from '@mui/material/styles';
17
17
  import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
18
- import { handlePrevScreenStep } from '../../../../app/settings';
18
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
19
19
  import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import Collapse from '../../../../components/Collapse';
21
21
  import Form from '../../../../components/Form';
22
- import { deepCopy } from '../../../../utils';
22
+ import { deepCopy, sendCustomEventToGTM } from '../../../../utils';
23
23
  import { ScreenContainer } from '../../../shared/Containers';
24
24
  import { clearError, brandSelector, updateSegmentBrand } from '../../../app/brand/brandStore';
25
25
  import Button from '../../../shared/Button';
@@ -46,6 +46,7 @@ var BrandInfo = function (_a) {
46
46
  var t = useTranslation().t;
47
47
  var isAr = useLanguage().isAr;
48
48
  var _l = useAppSelector(brandSelector), data = _l.data, loading = _l.loading, error = _l.error;
49
+ var settingsData = useAppSelector(settingsSelector).data;
49
50
  var _m = data.brandSegmentData, segmentLocation = _m.segmentLocation, segmentProfit = _m.segmentProfit, segmentTech = _m.segmentTech, teamSize = _m.teamSize;
50
51
  var _o = data.verify.responseBody || {}, brand = _o.brand, segmentDefaultValues = _o.segmentDefaultValues;
51
52
  var _p = brand || {}, data_status = _p.data_status, data_verification = _p.data_verification, resSegment = _p.segment;
@@ -93,6 +94,14 @@ var BrandInfo = function (_a) {
93
94
  var onBack = function () {
94
95
  dispatch(handlePrevScreenStep());
95
96
  };
97
+ React.useEffect(function () {
98
+ sendCustomEventToGTM({
99
+ event: 'Send Event',
100
+ event_category: 'Board Flows - Brand',
101
+ event_action: 'Update Business Market & Size',
102
+ event_label: settingsData.businessCountry.iso2
103
+ });
104
+ }, []);
96
105
  React.useEffect(function () {
97
106
  if (error)
98
107
  dispatch(clearError());
@@ -18,9 +18,9 @@ import { useAppDispatch, useLanguage, useAppSelector, useSetFromDefaultValues, u
18
18
  import Form from '../../../../components/Form';
19
19
  import { yupResolver } from '@hookform/resolvers/yup';
20
20
  import { useTranslation } from 'react-i18next';
21
- import { handlePrevScreenStep } from '../../../../app/settings';
21
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
22
22
  import Button from '../../../shared/Button';
23
- import { deepCopy } from '../../../../utils';
23
+ import { deepCopy, sendCustomEventToGTM } from '../../../../utils';
24
24
  import { ScreenContainer } from '../../../shared/Containers';
25
25
  import Collapse from '../../../../components/Collapse';
26
26
  import OperationStartDate from './OperationStartDate';
@@ -36,6 +36,7 @@ var Activities = function () {
36
36
  var _b = React.useState(false), anchorEl = _b[0], setAnchorEl = _b[1];
37
37
  var _c = React.useState(false), collapse = _c[0], setCollapse = _c[1];
38
38
  var dispatch = useAppDispatch();
39
+ var settingsData = useAppSelector(settingsSelector).data;
39
40
  var isAr = useLanguage().isAr;
40
41
  var t = useTranslation().t;
41
42
  var _d = useAppSelector(businessSelector), data = _d.data, loading = _d.loading, error = _d.error;
@@ -64,6 +65,14 @@ var Activities = function () {
64
65
  var onBack = function () {
65
66
  dispatch(handlePrevScreenStep());
66
67
  };
68
+ React.useEffect(function () {
69
+ sendCustomEventToGTM({
70
+ event: 'Send Event',
71
+ event_category: 'Account Creation Flow',
72
+ event_action: 'Brand Activities Details Page',
73
+ event_label: settingsData.businessCountry.iso2
74
+ });
75
+ }, []);
67
76
  React.useEffect(function () {
68
77
  if (error)
69
78
  dispatch(clearError());
@@ -23,7 +23,7 @@ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
23
23
  import { businessSelector, clearError, updateLeadBusinessType } from '../../../app/business/businessStore';
24
24
  import { BusinessType as Type } from '../../../../@types';
25
25
  import Button from '../../../shared/Button';
26
- import { deepCopy, isKW, isOtherLicense, isOtherThanKWOrSA, isSA } from '../../../../utils';
26
+ import { deepCopy, isKW, isOtherLicense, isOtherThanKWOrSA, isSA, sendCustomEventToGTM } from '../../../../utils';
27
27
  import { KWLicenseValidationSchema, LicenseValidationSchema, OtherCountryLicenseValidationSchema } from './validation';
28
28
  import LicenseList from './LicenseList';
29
29
  import LicenseCertificate from './LicenseCertificate';
@@ -46,6 +46,14 @@ var BusinessType = function (_a) {
46
46
  var isAr = useLanguage().isAr;
47
47
  var dispatch = useAppDispatch();
48
48
  var _d = React.useState(), listActive = _d[0], setListActive = _d[1];
49
+ React.useEffect(function () {
50
+ sendCustomEventToGTM({
51
+ event: 'Send Event',
52
+ event_category: 'Account Creation Flow',
53
+ event_action: 'CR Page',
54
+ event_label: settingsData.businessCountry.iso2
55
+ });
56
+ }, []);
49
57
  var handleMenuClick = function (flag) {
50
58
  setListActive(flag);
51
59
  };
@@ -17,7 +17,7 @@ import { useTranslation } from 'react-i18next';
17
17
  import { useForm, FormProvider } from 'react-hook-form';
18
18
  import { yupResolver } from '@hookform/resolvers/yup';
19
19
  import { useAppDispatch, useAppSelector, useDataNoneEditable, useDataVerified, useExcludeReadOnlyFelids, useFormErrorAndUpdateReadOnly, useFormReadOnly, useSetFromDefaultValues } from '../../../../hooks';
20
- import { handlePrevScreenStep } from '../../../../app/settings';
20
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
21
21
  import { CustomerInfoValidation } from './validation';
22
22
  import Form from '../../../../components/Form';
23
23
  import Button from '../../../shared/Button';
@@ -30,7 +30,7 @@ import TransactionPolicy from './TransactionPolicy';
30
30
  import { ScreenContainer } from '../../../shared/Containers';
31
31
  import Collapse from '../../../../components/Collapse';
32
32
  import { businessSelector, clearError, updateCustomersInfo } from '../../../app/business/businessStore';
33
- import { deepCopy } from '../../../../utils';
33
+ import { deepCopy, sendCustomEventToGTM } from '../../../../utils';
34
34
  var FormStyled = styled(Form)(function () { return ({
35
35
  display: 'flex',
36
36
  flexDirection: 'column'
@@ -45,6 +45,7 @@ var Customers = function (_a) {
45
45
  var _b, _c, _d, _e, _f;
46
46
  var _g = React.useState(), listActive = _g[0], setListActive = _g[1];
47
47
  var dispatch = useAppDispatch();
48
+ var settingsData = useAppSelector(settingsSelector).data;
48
49
  var _h = useAppSelector(businessSelector), data = _h.data, loading = _h.loading, error = _h.error;
49
50
  var _j = data.customersData, customerLocations = _j.customerLocations, expectedCustomer = _j.expectedCustomer, expectedSale = _j.expectedSale, refundPolicy = _j.refundPolicy, transactionPolicy = _j.transactionPolicy;
50
51
  var _k = ((_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) || {}, data_status = _k.data_status, data_verification = _k.data_verification, operations = _k.operations, terms = _k.terms;
@@ -75,6 +76,14 @@ var Customers = function (_a) {
75
76
  'operations.sales_range'
76
77
  ]);
77
78
  var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
79
+ React.useEffect(function () {
80
+ sendCustomEventToGTM({
81
+ event: 'Send Event',
82
+ event_category: 'Account Creation Flow',
83
+ event_action: 'Business Market and Size Details Page',
84
+ event_label: settingsData.businessCountry.iso2
85
+ });
86
+ }, []);
78
87
  React.useEffect(function () {
79
88
  var _a, _b;
80
89
  var isTermsAgreed = !!((_b = (_a = terms === null || terms === void 0 ? void 0 : terms.find) === null || _a === void 0 ? void 0 : _a.call(terms, function (_a) {
@@ -22,7 +22,7 @@ import Button from '../../../shared/Button';
22
22
  import { ScreenContainer } from '../../../shared/Containers';
23
23
  import { businessSelector, clearError, updateLeadIdentity } from '../../../app/business/businessStore';
24
24
  import Collapse from '../../../../components/Collapse';
25
- import { deepCopy, isOtherThanKWOrSA } from '../../../../utils';
25
+ import { deepCopy, isOtherThanKWOrSA, sendCustomEventToGTM } from '../../../../utils';
26
26
  import { NIDOtherCountryValidationSchema, NIDValidationSchema } from './validation';
27
27
  import ID from './ID';
28
28
  import DOB from './DOB';
@@ -44,6 +44,14 @@ var IDBOD = function (_a) {
44
44
  mode: 'onChange'
45
45
  });
46
46
  useSetFromDefaultValues(methods, data.nidData);
47
+ React.useEffect(function () {
48
+ sendCustomEventToGTM({
49
+ event: 'Send Event',
50
+ event_category: 'Account Creation Flow',
51
+ event_action: 'ID Details Step',
52
+ event_label: settingsData.businessCountry.iso2
53
+ });
54
+ }, []);
47
55
  React.useEffect(function () {
48
56
  if (error)
49
57
  dispatch(clearError());
@@ -10,13 +10,24 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { memo } from 'react';
13
+ import React, { memo } from 'react';
14
14
  import { useAppSelector } from '../../../../hooks';
15
15
  import { businessSelector } from '../../../app/business/businessStore';
16
16
  import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
17
+ import { sendCustomEventToGTM } from '../../../../utils';
18
+ import { settingsSelector } from '../../../../app/settings';
17
19
  var SuccessWithFlowButtons = function () {
18
20
  var data = useAppSelector(businessSelector).data;
21
+ var settingsData = useAppSelector(settingsSelector).data;
19
22
  var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals, recipient = _a.recipient;
23
+ React.useEffect(function () {
24
+ sendCustomEventToGTM({
25
+ event: 'Send Event',
26
+ event_category: 'Account Creation Flow',
27
+ event_action: 'Board Page View',
28
+ event_label: settingsData.businessCountry.iso2
29
+ });
30
+ }, []);
20
31
  return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [], recipient: recipient }));
21
32
  };
22
33
  export default memo(SuccessWithFlowButtons);
@@ -17,9 +17,9 @@ import { useForm, FormProvider } from 'react-hook-form';
17
17
  import { yupResolver } from '@hookform/resolvers/yup';
18
18
  import Box from '@mui/material/Box/Box';
19
19
  import { styled } from '@mui/material/styles';
20
- import { handlePrevScreenStep } from '../../../../app/settings';
20
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
21
21
  import { useLanguage } from '../../../../hooks';
22
- import { deepCopy, maskPhone } from '../../../../utils';
22
+ import { deepCopy, maskPhone, sendCustomEventToGTM } from '../../../../utils';
23
23
  import Form from '../../../../components/Form';
24
24
  import Text from '../../../../components/Text';
25
25
  import { ScreenContainer } from '../../../shared/Containers';
@@ -49,6 +49,7 @@ var FormStyled = styled(Form)(function () { return ({
49
49
  var VerifyNumber = function (_a) {
50
50
  var _b, _c;
51
51
  var dispatch = useAppDispatch();
52
+ var settingsData = useAppSelector(settingsSelector).data;
52
53
  var _d = useAppSelector(businessSelector), data = _d.data, loading = _d.loading, error = _d.error;
53
54
  var methods = useForm({
54
55
  resolver: yupResolver(OTPValidation),
@@ -59,6 +60,15 @@ var VerifyNumber = function (_a) {
59
60
  var isAr = useLanguage().isAr;
60
61
  var _e = React.useState(false), resendLoading = _e[0], setResendLoading = _e[1];
61
62
  var phone = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.verification_by) === null || _c === void 0 ? void 0 : _c.sent_to;
63
+ React.useEffect(function () {
64
+ var _a;
65
+ sendCustomEventToGTM({
66
+ event: 'Send Event',
67
+ event_category: 'Account Creation Flow',
68
+ event_action: 'Business OTP Step',
69
+ event_label: (_a = settingsData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2
70
+ });
71
+ }, []);
62
72
  React.useEffect(function () {
63
73
  if (error && methods.formState.isValid && phone)
64
74
  dispatch(clearError());
@@ -120,14 +120,15 @@ var Connect = memo(function (props) {
120
120
  event: 'Send Event',
121
121
  event_category: 'User Registration Flow',
122
122
  event_action: 'Registration Landing Page Viewed',
123
- event_value: (_b = data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2
123
+ event_label: (_b = data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2
124
124
  });
125
125
  sendCustomDimension({
126
126
  event: 'PageView',
127
127
  website_country: (_c = data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2
128
128
  });
129
129
  sendPageView({
130
- title: 'Connect'
130
+ title: 'Connect',
131
+ connect_flow: 'Normal'
131
132
  });
132
133
  }
133
134
  }, [data.businessCountry]);
@@ -52,7 +52,7 @@ import { useAppSelector, useAppDispatch, useLanguage } from '../../../../hooks';
52
52
  import { ScreenContainer } from '../../../shared/Containers';
53
53
  import BusinessCountry from '../../../shared/BusinessCountry';
54
54
  import Button from '../../../shared/Button';
55
- import { findCountryByIso2, isKW, isOtherThanKWOrSA, updateLocationUrlWithCountry } from '../../../../utils';
55
+ import { findCountryByIso2, isKW, isOtherThanKWOrSA, sendCustomEventToGTM, updateLocationUrlWithCountry } from '../../../../utils';
56
56
  import Collapse from '../../../../components/Collapse';
57
57
  import { handleNextScreenStep, handleSetCountryByIso2, settingsSelector } from '../../../../app/settings';
58
58
  import { connectSelector, setDefaultCountryCode, updateBusinessCountry, storeIsStartFromBusinessCountry, clearError } from '../../../app/connect/connectStore';
@@ -81,6 +81,12 @@ var BusinessCountryScreen = function (_a) {
81
81
  return [2];
82
82
  countryCode = findCountryByIso2(settingsData.countries, iso2);
83
83
  dispatch(handleSetCountryByIso2(iso2));
84
+ sendCustomEventToGTM({
85
+ event: 'Send Event',
86
+ event_category: 'User Registration Flow',
87
+ event_action: 'Country selection page view',
88
+ event_label: iso2
89
+ });
84
90
  if (settingsData.appConfig.mode !== 'popup')
85
91
  updateLocationUrlWithCountry(iso2);
86
92
  if (!data.leadId) return [3, 2];
@@ -74,12 +74,12 @@ var ListType;
74
74
  ListType["CountryCodeList"] = "CountryCodeList";
75
75
  })(ListType || (ListType = {}));
76
76
  var Mobile = function (_a) {
77
- var _b, _c;
77
+ var _b;
78
78
  var settingsStore = useAppSelector(settingsSelector);
79
- var _d = useAppSelector(connectSelector), data = _d.data, loading = _d.loading, error = _d.error;
80
- var _e = React.useState(), listType = _e[0], setListType = _e[1];
79
+ var _c = useAppSelector(connectSelector), data = _c.data, loading = _c.loading, error = _c.error;
80
+ var _d = React.useState(), listType = _d[0], setListType = _d[1];
81
81
  var dispatch = useAppDispatch();
82
- var _f = data.mobileData, mobile = _f.mobile, countryCode = _f.countryCode, termAndConditionChecked = _f.termAndConditionChecked;
82
+ var _e = data.mobileData, mobile = _e.mobile, countryCode = _e.countryCode, termAndConditionChecked = _e.termAndConditionChecked;
83
83
  var methods = useForm({
84
84
  resolver: yupResolver(PhoneValidationSchema),
85
85
  defaultValues: {
@@ -92,6 +92,7 @@ var Mobile = function (_a) {
92
92
  useSetFromDefaultValues(methods, data.mobileData);
93
93
  var t = useTranslation().t;
94
94
  var isAr = useLanguage().isAr;
95
+ var country = (_b = settingsStore.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2;
95
96
  var handleMenuListClick = function (flag) {
96
97
  setListType(flag);
97
98
  };
@@ -107,13 +108,15 @@ var Mobile = function (_a) {
107
108
  dispatch(resetNIDScreen());
108
109
  dispatch(resetCivilScreen());
109
110
  };
110
- var isKWCountry = React.useMemo(function () { var _a; return isKW((_a = settingsStore.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2); }, [(_b = settingsStore.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2]);
111
- var isOtherThanKWOrSACountry = React.useMemo(function () { var _a; return isOtherThanKWOrSA((_a = settingsStore.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2); }, [(_c = settingsStore.data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2]);
111
+ var isKWCountry = React.useMemo(function () { return isKW(country); }, [country]);
112
+ var isOtherThanKWOrSACountry = React.useMemo(function () { return isOtherThanKWOrSA(country); }, [country]);
112
113
  var onBack = function () {
114
+ var eventAction = isKWCountry ? 'PACI Click' : 'Abser Click';
113
115
  sendCustomEventToGTM({
114
116
  event: 'Send Event',
115
117
  event_category: 'User Registration Flow',
116
- event_action: 'Switch to ID Login Clicked'
118
+ event_action: eventAction,
119
+ event_label: country
117
120
  });
118
121
  dispatch(handlePrevScreenStep(isKWCountry ? 'CONNECT_CIVIL_ID_STEP' : 'CONNECT_NID_STEP'));
119
122
  };
@@ -94,7 +94,8 @@ var ConnectExpress = memo(function (_a) {
94
94
  var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant;
95
95
  React.useEffect(function () {
96
96
  sendPageView({
97
- title: 'Connect Express'
97
+ title: 'Connect Express',
98
+ connect_flow: 'Express'
98
99
  });
99
100
  }, []);
100
101
  React.useEffect(function () {
@@ -53,7 +53,7 @@ import { ScreenContainer } from '../../../shared/Containers';
53
53
  import BusinessCountry from '../../../shared/BusinessCountry';
54
54
  import Button from '../../../shared/Button';
55
55
  import Collapse from '../../../../components/Collapse';
56
- import { findCountryByIso2, isKW, isOtherThanKWOrSA } from '../../../../utils';
56
+ import { findCountryByIso2, isKW, isOtherThanKWOrSA, sendCustomEventToGTM } from '../../../../utils';
57
57
  import { handleNextScreenStep, handleSetCountryByIso2, settingsSelector } from '../../../../app/settings';
58
58
  import { clearError, connectExpressSelector, setDefaultCountryCode, storeIsStartFromBusinessCountry, updateBusinessCountryAsync } from '../../../app/connectExpress/connectExpressStore';
59
59
  var BusinessCountryScreen = function (_a) {
@@ -81,6 +81,12 @@ var BusinessCountryScreen = function (_a) {
81
81
  return [2];
82
82
  countryCode = findCountryByIso2(settingsData.countries, iso2);
83
83
  dispatch(handleSetCountryByIso2(iso2));
84
+ sendCustomEventToGTM({
85
+ event: 'Send Event',
86
+ event_category: 'User Registration Flow',
87
+ event_action: 'Country selection page view',
88
+ event_label: iso2
89
+ });
84
90
  if (!data.leadId) return [3, 2];
85
91
  return [4, dispatch(updateBusinessCountryAsync(iso2))];
86
92
  case 1:
@@ -30,7 +30,7 @@ import MobileNumber from './MobileNumber';
30
30
  import { PhoneValidationSchema } from './validation';
31
31
  import { ICONS_NAMES } from '../../../../constants';
32
32
  import TAC from './TAC';
33
- import { deepCopy } from '../../../../utils';
33
+ import { deepCopy, sendCustomEventToGTM } from '../../../../utils';
34
34
  var FormStyled = styled(Form)(function () { return ({
35
35
  display: 'flex',
36
36
  flexDirection: 'column'
@@ -96,6 +96,13 @@ var Mobile = function (_a) {
96
96
  };
97
97
  var onBack = function () {
98
98
  var screen = isKuwait ? 'CONNECT_EXPRESS_CIVIL_ID_STEP' : 'CONNECT_EXPRESS_NID_STEP';
99
+ var eventAction = isKuwait ? 'PACI Click' : 'Abser Click';
100
+ sendCustomEventToGTM({
101
+ event: 'Send Event',
102
+ event_category: 'User Registration Flow',
103
+ event_action: eventAction,
104
+ event_label: settingData.businessCountry.iso2
105
+ });
99
106
  dispatch(handlePrevScreenStep(screen));
100
107
  };
101
108
  var onBackToCountryList = function () {
@@ -16,10 +16,10 @@ import { useTranslation } from 'react-i18next';
16
16
  import { styled } from '@mui/material/styles';
17
17
  import Collapse from '@mui/material/Collapse';
18
18
  import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
19
- import { deepCopy, formatNumberAsCurrency, removeAllCharsFromNumber } from '../../../../utils';
19
+ import { deepCopy, formatNumberAsCurrency, removeAllCharsFromNumber, sendCustomEventToGTM } from '../../../../utils';
20
20
  import { clearError, entitySelector, updateEntityCapital } from '../../../app/entity/entityStore';
21
21
  import { yupResolver } from '@hookform/resolvers/yup';
22
- import { handlePrevScreenStep } from '../../../../app/settings';
22
+ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
23
23
  import { ScreenContainer } from '../../../shared/Containers';
24
24
  import Form from '../../../../components/Form';
25
25
  import Button from '../../../shared/Button';
@@ -39,6 +39,7 @@ var EntityCapital = function (_a) {
39
39
  var isAr = useLanguage().isAr;
40
40
  var t = useTranslation().t;
41
41
  var dispatch = useAppDispatch();
42
+ var settingsData = useAppSelector(settingsSelector).data;
42
43
  var _k = data.entityCapitalData, responseBody = _k.responseBody, capitalPaid = _k.capitalPaid, capitalShareCount = _k.capitalShareCount, capitalShareValue = _k.capitalShareValue, activities = _k.activities;
43
44
  var entity = (data.verify.responseBody || {}).entity;
44
45
  var _l = entity || {}, data_verification = _l.data_verification, capital = _l.capital, resActivities = _l.activities;
@@ -81,6 +82,14 @@ var EntityCapital = function (_a) {
81
82
  var isCapitalPaidVerified = dataVerified['capital.paid'] && resCapitalPaidValue === removeAllCharsFromNumber(watch('capitalPaid'));
82
83
  var isCapitalShareCountVerified = dataVerified['capital.shares.count'] && resCapitalShareCount === ((_g = watch('capitalShareCount')) === null || _g === void 0 ? void 0 : _g.toString());
83
84
  var isCapitalShareValueVerified = dataVerified['capital.shares.value'] && resCapitalShareValue === removeAllCharsFromNumber(watch('capitalShareValue'));
85
+ React.useEffect(function () {
86
+ sendCustomEventToGTM({
87
+ event: 'Send Event',
88
+ event_category: 'Board Flows - Entity',
89
+ event_action: 'Entity Activities and Capital Details Page',
90
+ event_label: settingsData.businessCountry.iso2
91
+ });
92
+ }, []);
84
93
  var onSubmit = function (data) {
85
94
  var formData = __assign(__assign({}, deepCopy(getFelids(data))), { isDirty: isDirty });
86
95
  dispatch(updateEntityCapital(formData));
@@ -17,7 +17,7 @@ import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import { styled } from '@mui/material/styles';
18
18
  import { useAppDispatch, useAppSelector, useDataNoneEditable, useFormReadOnly, useLanguage, useSetFromDefaultValues, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
19
19
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
20
- import { convertToEnglishDateFormat, deepCopy, getFileDetailsFromDocument, isKW, isSA } from '../../../../utils';
20
+ import { convertToEnglishDateFormat, deepCopy, getFileDetailsFromDocument, isKW, isSA, sendCustomEventToGTM } from '../../../../utils';
21
21
  import { BusinessType, DocumentPurpose } from '../../../../@types';
22
22
  import Form from '../../../../components/Form';
23
23
  import Collapse from '../../../../components/Collapse';
@@ -137,6 +137,12 @@ var EntityName = function (_a) {
137
137
  setEntityTypeAnchorEl(flag);
138
138
  };
139
139
  var onBack = function () {
140
+ sendCustomEventToGTM({
141
+ event: 'Send Event',
142
+ event_category: 'Board Flows - Entity',
143
+ event_action: 'Entity Details Back button',
144
+ event_label: settingsData.businessCountry.iso2
145
+ });
140
146
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
141
147
  dispatch(handlePrevScreenStep());
142
148
  return;
@@ -19,7 +19,7 @@ import Box from '@mui/material/Box';
19
19
  import { alpha, styled } from '@mui/material/styles';
20
20
  import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
21
21
  import { DocumentPurpose, IndividualType } from '../../../../@types';
22
- import { deepCopy, getIndividualType, isKW, isKWOrSA } from '../../../../utils';
22
+ import { deepCopy, getIndividualType, isKW, isKWOrSA, sendCustomEventToGTM } from '../../../../utils';
23
23
  import Form from '../../../../components/Form';
24
24
  import Collapse from '../../../../components/Collapse';
25
25
  import Text from '../../../../components/Text';
@@ -135,6 +135,14 @@ var AdditionalIndividualInfo = function (_a) {
135
135
  var isInfluencerSwitchVerified = dataVerified['is_influencer'] && is_influencer === watch('isInfluencer');
136
136
  var isAuthorizedSwitchVerified = dataVerified['is_authorized'] && is_authorized === watch('isAuthorized');
137
137
  var _j = React.useState(), listActive = _j[0], setListActive = _j[1];
138
+ React.useEffect(function () {
139
+ sendCustomEventToGTM({
140
+ event: 'Send Event',
141
+ event_category: 'Board Flows - Individual',
142
+ event_action: 'Income Details Page',
143
+ event_label: settingsData.businessCountry.iso2
144
+ });
145
+ }, []);
138
146
  var onSubmit = function (data) {
139
147
  var formData = __assign(__assign({}, deepCopy(getFelids(__assign(__assign({}, data), { signatureFileUploading: signatureFileUploading, civilIDUploading: civilIDUploading })))), { isDirty: isDirty });
140
148
  dispatch(updateIndividualInfo(formData));
@@ -20,6 +20,7 @@ import Collapse from '../../../../components/Collapse';
20
20
  import Warning from '../../../../components/Warning';
21
21
  import Button from '../../../../components/Button';
22
22
  import Loader from '../../../../components/Loader';
23
+ import { sendCustomEventToGTM } from '../../../../utils';
23
24
  import { ScreenContainer } from '../../../shared/Containers';
24
25
  import { individualSelector, retrieveBoardStatus } from '../../../app/individual/individualStore';
25
26
  import UserList from './UserList';
@@ -54,6 +55,12 @@ var IndividualList = function () {
54
55
  var settingsData = useAppSelector(settingsSelector).data;
55
56
  var flows = (data.verify.responseBody || {}).flows;
56
57
  var onBack = function () {
58
+ sendCustomEventToGTM({
59
+ event: 'Send Event',
60
+ event_category: 'Board Flows - Individual',
61
+ event_action: 'Individual Details Back Button',
62
+ event_label: settingsData.businessCountry.iso2
63
+ });
57
64
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
58
65
  dispatch(handlePrevScreenStep());
59
66
  return;
@@ -18,7 +18,7 @@ import { handleCurrentActiveScreen, handlePrevScreenStep, settingsSelector } fro
18
18
  import Box from '@mui/material/Box';
19
19
  import { alpha, styled } from '@mui/material/styles';
20
20
  import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified, useFormDirtyCheck } from '../../../../hooks';
21
- import { convertToEnglishDateFormat, deepCopy, findCountryByIddPrefix, findCountryByIso2, getUserName, isKWOrSA, isOtherThanKWOrSA } from '../../../../utils';
21
+ import { convertToEnglishDateFormat, deepCopy, findCountryByIddPrefix, findCountryByIso2, getUserName, isKWOrSA, isOtherThanKWOrSA, sendCustomEventToGTM } from '../../../../utils';
22
22
  import Form from '../../../../components/Form';
23
23
  import Collapse from '../../../../components/Collapse';
24
24
  import Text from '../../../../components/Text';
@@ -185,6 +185,14 @@ var IndividualPersonalInfo = function (_a) {
185
185
  if (error)
186
186
  dispatch(clearError());
187
187
  }, [methods.formState.isValid]);
188
+ React.useEffect(function () {
189
+ sendCustomEventToGTM({
190
+ event: 'Send Event',
191
+ event_category: 'Board Flows - Individual',
192
+ event_action: 'Update Personal Data Page',
193
+ event_label: settingsData.businessCountry.iso2
194
+ });
195
+ }, []);
188
196
  var onBack = function () {
189
197
  if (error)
190
198
  dispatch(clearError());
@@ -192,6 +200,12 @@ var IndividualPersonalInfo = function (_a) {
192
200
  dispatch(handleCurrentActiveScreen('INDIVIDUAL_LIST_STEP'));
193
201
  return;
194
202
  }
203
+ sendCustomEventToGTM({
204
+ event: 'Send Event',
205
+ event_category: 'Board Flows - Individual',
206
+ event_action: 'Individual Details Back Button',
207
+ event_label: settingsData.businessCountry.iso2
208
+ });
195
209
  if ((flows === null || flows === void 0 ? void 0 : flows.length) > 0) {
196
210
  dispatch(handlePrevScreenStep('INDIVIDUAL_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
197
211
  return;
@@ -48,6 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
48
48
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
49
  import { useState } from 'react';
50
50
  import { useTranslation } from 'react-i18next';
51
+ import { capitalize } from 'lodash-es';
51
52
  import Button from '../../../components/Button';
52
53
  import { Button as SharedButton } from '../../shared/Button';
53
54
  import { alpha, styled } from '@mui/material/styles';
@@ -57,7 +58,8 @@ import { ICONS_NAMES } from '../../../constants';
57
58
  import CheckIcon from '@mui/icons-material/Check';
58
59
  import { useAppDispatch, useAppSelector, useLanguage } from '../../../hooks';
59
60
  import { handleOpen, handleCurrentActiveScreen, handleNextScreenStep, settingsSelector } from '../../../app/settings';
60
- import { dangerousMessage, getScreenNameBasedOnFlow, isKWOrSA } from '../../../utils';
61
+ import { FlowsTypes } from '../../../@types';
62
+ import { dangerousMessage, getScreenNameBasedOnFlow, isKWOrSA, sendCustomEventToGTM } from '../../../utils';
61
63
  import API from '../../../api';
62
64
  import Text from '../../../components/Text';
63
65
  import Dot from '../Dot';
@@ -160,6 +162,13 @@ export default function FlowsButtons(_a) {
160
162
  var onRedirect = function (item) {
161
163
  if (!item.href)
162
164
  return;
165
+ var name = flowName === FlowsTypes.BANK ? 'Wallet' : capitalize(flowName);
166
+ sendCustomEventToGTM({
167
+ event: 'Send Event',
168
+ event_category: "Board Flows - ".concat(name),
169
+ event_action: "".concat(name, " Kit Click"),
170
+ event_label: settingsData.businessCountry.iso2
171
+ });
163
172
  if (flowName === item.name && !isResetPassword(item.name, item.status)) {
164
173
  var isOtherThanSAOrKWCountry = !isKWOrSA(settingsData.businessCountry.iso2);
165
174
  dispatch(handleCurrentActiveScreen(getScreenNameBasedOnFlow(item.name, isAuthorizedUser, isOtherThanSAOrKWCountry)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.8.48-development",
3
+ "version": "2.8.49-development",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",