@tap-payments/auth-jsconnect 2.4.43-test → 2.4.46-test
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.
- package/build/@types/app.d.ts +6 -0
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/features/app/business/businessStore.js +1 -0
- package/build/features/app/connect/connectStore.js +2 -2
- package/build/features/connect/Connect.js +6 -3
- package/build/features/connect/screens/ThankYou/ThankYou.js +4 -1
- package/build/utils/gtm.d.ts +3 -2
- package/build/utils/gtm.js +3 -0
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
|
@@ -585,4 +585,10 @@ export declare type DataLayer = {
|
|
|
585
585
|
event_value?: number | string;
|
|
586
586
|
event_noninteraction?: number;
|
|
587
587
|
};
|
|
588
|
+
export declare type CountryTrackingData = {
|
|
589
|
+
website_country?: string;
|
|
590
|
+
};
|
|
591
|
+
export declare type LeadIdentificationData = {
|
|
592
|
+
lead_ID?: string;
|
|
593
|
+
};
|
|
588
594
|
export {};
|
|
@@ -49,7 +49,7 @@ var BottomSheetStyled = styled(BottomSheet, { shouldForwardProp: function (prop)
|
|
|
49
49
|
backgroundColor: 'transparent'
|
|
50
50
|
},
|
|
51
51
|
'[data-rsbs-header]': __assign({ paddingBottom: theme.spacing(6), position: 'absolute', width: '100vw' }, (isMaturityExpress && { display: 'none' })),
|
|
52
|
-
'[data-rsbs-overlay]': __assign({ backgroundColor: theme.palette.background.paper, zIndex: 9999, maxHeight: 'calc(100vh -
|
|
52
|
+
'[data-rsbs-overlay]': __assign({ backgroundColor: theme.palette.background.paper, zIndex: 9999, maxHeight: 'calc(100vh - 100px)' }, (isMaturityExpress && { maxHeight: 'calc(100vh - 180px)', marginBottom: theme.spacing(5.625), paddingTop: theme.spacing(5) })),
|
|
53
53
|
'[data-rsbs-scroll]': {
|
|
54
54
|
'&::-webkit-scrollbar': {
|
|
55
55
|
width: '0px'
|
|
@@ -508,6 +508,7 @@ export var updateLeadBusinessType = createAsyncThunk('updateLeadBusinessType', f
|
|
|
508
508
|
return [4, API.accountService.createAccount(accountBody)];
|
|
509
509
|
case 3:
|
|
510
510
|
accountData = _f.sent();
|
|
511
|
+
thunkApi.dispatch(updateStepName(BUSINESS_STEP_NAMES.BUSINESS_INFO_CONFIRM));
|
|
511
512
|
return [4, API.brandService.retrieveBrand(brand === null || brand === void 0 ? void 0 : brand.id)];
|
|
512
513
|
case 4:
|
|
513
514
|
brandRes = (_f.sent()).brand;
|
|
@@ -252,13 +252,13 @@ export var verifyAuth = createAsyncThunk('connect/verifyAuth', function (params,
|
|
|
252
252
|
return [4, API.authService.verifyAuth(payload)];
|
|
253
253
|
case 1:
|
|
254
254
|
data = (_g.sent()).data;
|
|
255
|
+
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
256
|
+
throw new Error(data.errors[0].description);
|
|
255
257
|
sendCustomEventToGTM({
|
|
256
258
|
event: 'Send Event',
|
|
257
259
|
event_category: 'User Registration Flow',
|
|
258
260
|
event_action: 'First OTP Success'
|
|
259
261
|
});
|
|
260
|
-
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
261
|
-
throw new Error(data.errors[0].description);
|
|
262
262
|
lead_id = data.lead_id;
|
|
263
263
|
if (!lead_id)
|
|
264
264
|
throw new Error('Lead id is missing');
|
|
@@ -20,7 +20,7 @@ import { store } from '../../app/store';
|
|
|
20
20
|
import { connectSelector, setDefaultCountryCode } from '../app/connect/connectStore';
|
|
21
21
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
22
22
|
import Collapse from '../../components/Collapse';
|
|
23
|
-
import { isKW, findOrCreateElementAndInject, initializeGTM, sendCustomEventToGTM } from '../../utils';
|
|
23
|
+
import { isKW, findOrCreateElementAndInject, initializeGTM, sendCustomEventToGTM, sendCustomDimension } from '../../utils';
|
|
24
24
|
import { CONNECT_SCREENS_NAVIGATION } from '../../constants';
|
|
25
25
|
import { connectFeatureScreens } from '../featuresScreens';
|
|
26
26
|
import Background from '../shared/Background';
|
|
@@ -48,14 +48,17 @@ var Connect = memo(function (props) {
|
|
|
48
48
|
}
|
|
49
49
|
}, [settingLoading]);
|
|
50
50
|
React.useEffect(function () {
|
|
51
|
-
var _a, _b;
|
|
51
|
+
var _a, _b, _c;
|
|
52
52
|
if (!!((_a = data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2)) {
|
|
53
53
|
dispatch(setDefaultCountryCode(data.businessCountry));
|
|
54
54
|
sendCustomEventToGTM({
|
|
55
55
|
event: 'Send Event',
|
|
56
56
|
event_category: 'User Registration Flow',
|
|
57
57
|
event_action: 'Registration Landing Page Viewed',
|
|
58
|
-
|
|
58
|
+
event_value: (_b = data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2
|
|
59
|
+
});
|
|
60
|
+
sendCustomDimension({
|
|
61
|
+
website_country: (_c = data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
64
|
}, [data.businessCountry]);
|
|
@@ -4,7 +4,7 @@ import { useTranslation, Trans } from 'react-i18next';
|
|
|
4
4
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
5
|
import { connectSelector } from '../../../app/connect/connectStore';
|
|
6
6
|
import { useAppSelector } from '../../../../hooks';
|
|
7
|
-
import { maskEmail, sendCustomEventToGTM } from '../../../../utils';
|
|
7
|
+
import { maskEmail, sendCustomDimension, sendCustomEventToGTM } from '../../../../utils';
|
|
8
8
|
var ThankYou = function (_a) {
|
|
9
9
|
var _b, _c, _d;
|
|
10
10
|
var t = useTranslation().t;
|
|
@@ -21,6 +21,9 @@ var ThankYou = function (_a) {
|
|
|
21
21
|
event_label: 'Product Type',
|
|
22
22
|
event_value: id
|
|
23
23
|
});
|
|
24
|
+
sendCustomDimension({
|
|
25
|
+
lead_ID: id
|
|
26
|
+
});
|
|
24
27
|
}, []);
|
|
25
28
|
return (_jsx(SuccessScreen, { title: t("connect_completed_title"), description: _jsx(Trans, { i18nKey: 'connect_completed_description_dev', values: { email: email } }), showEmailProviders: true }));
|
|
26
29
|
};
|
package/build/utils/gtm.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DataLayer } from '../@types';
|
|
2
|
-
export declare const pushToDataLayer: (data: DataLayer) => void;
|
|
1
|
+
import { CountryTrackingData, DataLayer, LeadIdentificationData } from '../@types';
|
|
2
|
+
export declare const pushToDataLayer: (data: DataLayer | CountryTrackingData | LeadIdentificationData) => void;
|
|
3
3
|
export declare const initializeGTM: () => void;
|
|
4
4
|
export declare const sendCustomEventToGTM: (data: DataLayer) => void;
|
|
5
|
+
export declare const sendCustomDimension: (data: CountryTrackingData | LeadIdentificationData) => void;
|
package/build/utils/gtm.js
CHANGED
|
@@ -21,3 +21,6 @@ export var initializeGTM = function () {
|
|
|
21
21
|
export var sendCustomEventToGTM = function (data) {
|
|
22
22
|
pushToDataLayer(__assign({ event_value: 0, event_noninteraction: 0, event_label: '' }, data));
|
|
23
23
|
};
|
|
24
|
+
export var sendCustomDimension = function (data) {
|
|
25
|
+
pushToDataLayer(data);
|
|
26
|
+
};
|