@adyen/kyc-components 2.62.0 → 2.63.0

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.
@@ -45,6 +45,15 @@ class UserEvents {
45
45
  this.add({ type: "add_event", name: eventName, properties: { ...completeEvent } });
46
46
  this.notifySubscribers();
47
47
  }
48
+ /**
49
+ * Adds an event with context specific to task-related events
50
+ */
51
+ addTaskEvent(eventName, properties) {
52
+ this.addEvent(eventName, {
53
+ actionLevel: "task",
54
+ ...properties
55
+ });
56
+ }
48
57
  /**
49
58
  * Adds an event with context specific to page-related events
50
59
  */
@@ -105,11 +114,9 @@ class UserEvents {
105
114
  }
106
115
  const userEvents = new UserEvents();
107
116
  const getAssociatedLeAnalyticsPayload = ({
108
- task,
109
117
  associatedLegalEntity,
110
118
  associatedLegalEntityOrg
111
119
  }) => ({
112
- task,
113
120
  ...associatedLegalEntity ? {
114
121
  associatedLegalEntityId: associatedLegalEntity == null ? void 0 : associatedLegalEntity.id,
115
122
  associatedLegalEntityType: associatedLegalEntity == null ? void 0 : associatedLegalEntity.type
@@ -1083,7 +1090,7 @@ const defaultTrans = {
1083
1090
  objectOfCharitableTrust: "Object of charitable trust",
1084
1091
  objectOfTrust: "Object of trust",
1085
1092
  obligatory: "Obligatory",
1086
- officialEmailOrALetterFromYourBank: "Official email or a letter from your bank",
1093
+ aLetterFromYourBank: "A letter from your bank",
1087
1094
  oib: "OIB",
1088
1095
  onOnlineBankingEnvironment: "Or web version of online banking environment",
1089
1096
  onboardingRedirectAwaitingCtaButton: "Continue",
@@ -8163,22 +8170,19 @@ function BusinessRegistrationNumberField({
8163
8170
  ] });
8164
8171
  }
8165
8172
  function ContextGuidance({
8166
- page,
8167
8173
  title,
8168
8174
  content,
8169
8175
  titleId,
8170
8176
  contentId,
8171
- baseTrackingPayload
8177
+ trackingParams
8172
8178
  }) {
8173
8179
  const onGuidanceToggle = (status) => {
8174
- userEvents.addEvent("Clicked accordion", {
8175
- ...baseTrackingPayload,
8180
+ userEvents.addFieldEvent("Clicked accordion", {
8176
8181
  actionType: status,
8177
- actionLevel: "field",
8178
8182
  field: "context guidance",
8179
- page,
8180
8183
  label: titleId,
8181
- content: contentId
8184
+ content: contentId,
8185
+ ...trackingParams
8182
8186
  });
8183
8187
  };
8184
8188
  return /* @__PURE__ */ jsx(Alert, { title, type: "collapsible", variant: "info", onToggle: onGuidanceToggle, children: content });
@@ -10084,46 +10088,6 @@ function VatNumberField({
10084
10088
  )
10085
10089
  ] });
10086
10090
  }
10087
- var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
10088
- TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
10089
- TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
10090
- TaskTypes2["TASKS_OVERVIEW"] = "TASKS_OVERVIEW";
10091
- TaskTypes2["REVIEW"] = "REVIEW";
10092
- TaskTypes2["INDIVIDUAL"] = "INDIVIDUAL";
10093
- TaskTypes2["COMPANY"] = "COMPANY";
10094
- TaskTypes2["BUSINESS_DETAILS"] = "BUSINESS_DETAILS";
10095
- TaskTypes2["PAYOUT"] = "PAYOUT";
10096
- TaskTypes2["PAYIN"] = "PAYIN";
10097
- TaskTypes2["SERVICE_AGREEMENT"] = "SERVICE_AGREEMENT";
10098
- TaskTypes2["PCI_DSS"] = "PCI_DSS";
10099
- TaskTypes2["DECISION_MAKER"] = "DECISION_MAKER";
10100
- TaskTypes2["DECISION_MAKER_OVERVIEW"] = "DECISION_MAKER_OVERVIEW";
10101
- TaskTypes2["TRUST"] = "TRUST";
10102
- TaskTypes2["TRUST_MEMBER_OVERVIEW"] = "TRUST_MEMBER";
10103
- TaskTypes2["TRUST_MEMBER_INDIVIDUAL"] = "TRUST_MEMBER_INDIVIDUAL";
10104
- TaskTypes2["TRUST_MEMBER_COMPANY"] = "TRUST_MEMBER_COMPANY";
10105
- TaskTypes2["TRUST_MEMBER_ROLE_AND_TYPE"] = "TRUST_MEMBER_ROLE_AND_TYPE";
10106
- TaskTypes2["TRUST_MEMBER_COMPANY_OWNER"] = "TRUST_MEMBER_COMPANY_OWNER";
10107
- TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
10108
- TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
10109
- TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
10110
- TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
10111
- TaskTypes2["LEGAL_REPRESENTATIVE_DETAILS"] = "LEGAL_REPRESENTATIVE_DETAILS";
10112
- return TaskTypes2;
10113
- })(TaskTypes || {});
10114
- var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
10115
- TaskStatus2[TaskStatus2["EMPTY"] = 0] = "EMPTY";
10116
- TaskStatus2[TaskStatus2["FINISHED"] = 1] = "FINISHED";
10117
- TaskStatus2[TaskStatus2["PROCESSING"] = 2] = "PROCESSING";
10118
- TaskStatus2[TaskStatus2["DETAILS_REQUIRED"] = 3] = "DETAILS_REQUIRED";
10119
- TaskStatus2[TaskStatus2["SIGN"] = 4] = "SIGN";
10120
- TaskStatus2[TaskStatus2["DOWNLOAD"] = 5] = "DOWNLOAD";
10121
- TaskStatus2[TaskStatus2["ERROR"] = 6] = "ERROR";
10122
- TaskStatus2[TaskStatus2["SIGNED"] = 7] = "SIGNED";
10123
- TaskStatus2[TaskStatus2["SUBMIT"] = 8] = "SUBMIT";
10124
- TaskStatus2[TaskStatus2["REMOVING"] = 9] = "REMOVING";
10125
- return TaskStatus2;
10126
- })(TaskStatus || {});
10127
10091
  const FLOWS_THAT_HIDE_REGISTRATION_NUMBER = [
10128
10092
  { companyType: [CompanyTypesValue.SOLE_PROPRIETORSHIP], country: CountryCodes.Gibraltar },
10129
10093
  { companyType: [CompanyTypesValue.SOLE_PROPRIETORSHIP], country: CountryCodes.Guernsey },
@@ -10310,12 +10274,10 @@ function CompanyRegistrationDetailsComponent(props) {
10310
10274
  /* @__PURE__ */ jsx(
10311
10275
  ContextGuidance,
10312
10276
  {
10313
- page: "Company registration details",
10314
10277
  title: i18n.get("whyDoINeedToFillInThisInformation"),
10315
10278
  content: i18n.get("reasonForFillingCompanyRegistrationDetails"),
10316
10279
  titleId: "whyDoINeedToFillInThisInformation",
10317
- contentId: "reasonForFillingCompanyRegistrationDetails",
10318
- baseTrackingPayload: { task: TaskTypes.COMPANY }
10280
+ contentId: "reasonForFillingCompanyRegistrationDetails"
10319
10281
  }
10320
10282
  ),
10321
10283
  /* @__PURE__ */ jsxs("fieldset", { form: COMPANY_REGISTRATION_DETAILS, children: [
@@ -13531,8 +13493,7 @@ function RegistrationAddressComponent(props) {
13531
13493
  handleFindAddress,
13532
13494
  country,
13533
13495
  data,
13534
- validators: validators2,
13535
- baseTrackingPayload
13496
+ validators: validators2
13536
13497
  } = props;
13537
13498
  const {
13538
13499
  requiredFields: registrationAddressRequiredFields,
@@ -13618,12 +13579,10 @@ function RegistrationAddressComponent(props) {
13618
13579
  /* @__PURE__ */ jsx(
13619
13580
  ContextGuidance,
13620
13581
  {
13621
- page: "Company registered address",
13622
13582
  titleId: "whyDoINeedToFillInThisInformation",
13623
13583
  contentId: "reasonForFillingCompanyAddressDetails",
13624
13584
  title: i18n.get("whyDoINeedToFillInThisInformation"),
13625
- content: i18n.get("reasonForFillingCompanyAddressDetails"),
13626
- baseTrackingPayload
13585
+ content: i18n.get("reasonForFillingCompanyAddressDetails")
13627
13586
  }
13628
13587
  ),
13629
13588
  /* @__PURE__ */ jsx(
@@ -14049,8 +14008,7 @@ function CompanyComponent(props) {
14049
14008
  country: props.country,
14050
14009
  problems: props.problems,
14051
14010
  handleAddressSearch: props.handleAddressSearch,
14052
- handleFindAddress: props.handleFindAddress,
14053
- baseTrackingPayload: { task: TaskTypes.COMPANY }
14011
+ handleFindAddress: props.handleFindAddress
14054
14012
  }
14055
14013
  )
14056
14014
  }
@@ -14282,6 +14240,46 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
14282
14240
  reader.onerror = (error) => reject(error);
14283
14241
  });
14284
14242
  const getFileExtention = (fileName) => fileName.split(".").pop();
14243
+ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
14244
+ TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
14245
+ TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
14246
+ TaskTypes2["TASKS_OVERVIEW"] = "TASKS_OVERVIEW";
14247
+ TaskTypes2["REVIEW"] = "REVIEW";
14248
+ TaskTypes2["INDIVIDUAL"] = "INDIVIDUAL";
14249
+ TaskTypes2["COMPANY"] = "COMPANY";
14250
+ TaskTypes2["BUSINESS_DETAILS"] = "BUSINESS_DETAILS";
14251
+ TaskTypes2["PAYOUT"] = "PAYOUT";
14252
+ TaskTypes2["PAYIN"] = "PAYIN";
14253
+ TaskTypes2["SERVICE_AGREEMENT"] = "SERVICE_AGREEMENT";
14254
+ TaskTypes2["PCI_DSS"] = "PCI_DSS";
14255
+ TaskTypes2["DECISION_MAKER"] = "DECISION_MAKER";
14256
+ TaskTypes2["DECISION_MAKER_OVERVIEW"] = "DECISION_MAKER_OVERVIEW";
14257
+ TaskTypes2["TRUST"] = "TRUST";
14258
+ TaskTypes2["TRUST_MEMBER_OVERVIEW"] = "TRUST_MEMBER";
14259
+ TaskTypes2["TRUST_MEMBER_INDIVIDUAL"] = "TRUST_MEMBER_INDIVIDUAL";
14260
+ TaskTypes2["TRUST_MEMBER_COMPANY"] = "TRUST_MEMBER_COMPANY";
14261
+ TaskTypes2["TRUST_MEMBER_ROLE_AND_TYPE"] = "TRUST_MEMBER_ROLE_AND_TYPE";
14262
+ TaskTypes2["TRUST_MEMBER_COMPANY_OWNER"] = "TRUST_MEMBER_COMPANY_OWNER";
14263
+ TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
14264
+ TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
14265
+ TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
14266
+ TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
14267
+ TaskTypes2["LEGAL_REPRESENTATIVE_DETAILS"] = "LEGAL_REPRESENTATIVE_DETAILS";
14268
+ return TaskTypes2;
14269
+ })(TaskTypes || {});
14270
+ var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
14271
+ TaskStatus2[TaskStatus2["EMPTY"] = 0] = "EMPTY";
14272
+ TaskStatus2[TaskStatus2["FINISHED"] = 1] = "FINISHED";
14273
+ TaskStatus2[TaskStatus2["PROCESSING"] = 2] = "PROCESSING";
14274
+ TaskStatus2[TaskStatus2["DETAILS_REQUIRED"] = 3] = "DETAILS_REQUIRED";
14275
+ TaskStatus2[TaskStatus2["SIGN"] = 4] = "SIGN";
14276
+ TaskStatus2[TaskStatus2["DOWNLOAD"] = 5] = "DOWNLOAD";
14277
+ TaskStatus2[TaskStatus2["ERROR"] = 6] = "ERROR";
14278
+ TaskStatus2[TaskStatus2["SIGNED"] = 7] = "SIGNED";
14279
+ TaskStatus2[TaskStatus2["SUBMIT"] = 8] = "SUBMIT";
14280
+ TaskStatus2[TaskStatus2["REMOVING"] = 9] = "REMOVING";
14281
+ return TaskStatus2;
14282
+ })(TaskStatus || {});
14285
14283
  const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
14286
14284
  CountryCodes.Australia,
14287
14285
  CountryCodes.Gibraltar,
@@ -15993,7 +15991,6 @@ function IdVerificationMethodComponent(props) {
15993
15991
  /* @__PURE__ */ jsx(
15994
15992
  ContextGuidance,
15995
15993
  {
15996
- page: "Instant verification with Onfido",
15997
15994
  title: i18n.get("howVerificationWithOnfidoWork"),
15998
15995
  content: /* @__PURE__ */ jsxs(Fragment, { children: [
15999
15996
  /* @__PURE__ */ jsx(Typography, { className: "adyen-kyc-u-margin-bottom-8", children: i18n.get("onfidoIsOurTrustedPartner") }),
@@ -16006,8 +16003,7 @@ function IdVerificationMethodComponent(props) {
16006
16003
  /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy", external: true, children: i18n.get("learnMore") })
16007
16004
  ] }),
16008
16005
  titleId: "howVerificationWithOnfidoWork",
16009
- contentId: "howVerificationWithOnfidoWorkContent",
16010
- baseTrackingPayload: { task: TaskTypes.INDIVIDUAL }
16006
+ contentId: "howVerificationWithOnfidoWorkContent"
16011
16007
  }
16012
16008
  ),
16013
16009
  (countryOfResidence === CountryCodes.PuertoRico || countryOfResidence === CountryCodes.UnitedStates) && data.idVerificationMethod === "instantVerification" && /* @__PURE__ */ jsx(
@@ -17611,8 +17607,7 @@ const DriversLicense$1 = ({
17611
17607
  formUtils,
17612
17608
  isValid,
17613
17609
  errorMessages,
17614
- shouldValidate,
17615
- baseTrackingPayload
17610
+ shouldValidate
17616
17611
  }) => {
17617
17612
  const { i18n } = useI18nContext();
17618
17613
  const { dataset: auStates } = useDataset(datasetIdentifier.state("AU"));
@@ -17684,7 +17679,6 @@ const DriversLicense$1 = ({
17684
17679
  /* @__PURE__ */ jsx(
17685
17680
  ContextGuidance,
17686
17681
  {
17687
- page: "Personal details",
17688
17682
  title: i18n.get("whereCanIFindTheseNumbersOnMyDriversLicense"),
17689
17683
  content: /* @__PURE__ */ jsxs(Fragment, { children: [
17690
17684
  i18n.get("whereToFindNumbersOnDriversLicense"),
@@ -17692,8 +17686,7 @@ const DriversLicense$1 = ({
17692
17686
  /* @__PURE__ */ jsx(Link, { href: "https://www.usi.gov.au/about/forms-id/drivers-licence", children: i18n.get("iStillCantFindIt") })
17693
17687
  ] }),
17694
17688
  titleId: "whereCanIFindTheseNumbersOnMyDriversLicense",
17695
- contentId: "whereToFindNumbersOnDriversLicense",
17696
- baseTrackingPayload
17689
+ contentId: "whereToFindNumbersOnDriversLicense"
17697
17690
  }
17698
17691
  )
17699
17692
  ] });
@@ -17829,8 +17822,7 @@ function IdentityAuComponent({
17829
17822
  ),
17830
17823
  issuerState: formUtils.getErrorMessage("issuerState", errors, fieldProblems)
17831
17824
  },
17832
- shouldValidate,
17833
- baseTrackingPayload: { task: TaskTypes.INDIVIDUAL }
17825
+ shouldValidate
17834
17826
  }
17835
17827
  ) : void 0
17836
17828
  ] });
@@ -17947,8 +17939,7 @@ const DriversLicense = ({
17947
17939
  formUtils,
17948
17940
  isValid,
17949
17941
  errorMessages,
17950
- shouldValidate,
17951
- baseTrackingPayload
17942
+ shouldValidate
17952
17943
  }) => {
17953
17944
  const { i18n } = useI18nContext();
17954
17945
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -17999,7 +17990,6 @@ const DriversLicense = ({
17999
17990
  /* @__PURE__ */ jsx(
18000
17991
  ContextGuidance,
18001
17992
  {
18002
- page: "Personal details",
18003
17993
  title: i18n.get("whereCanIFindTheseNumbersOnMyDriversLicense"),
18004
17994
  content: /* @__PURE__ */ jsxs(Fragment, { children: [
18005
17995
  i18n.get("whereToFindNumbersOnDriversLicense__NZ"),
@@ -18007,8 +17997,7 @@ const DriversLicense = ({
18007
17997
  /* @__PURE__ */ jsx(Link, { href: "https://www.nzta.govt.nz/driver-licences/getting-a-licence/your-driver-licence-explained/", children: i18n.get("iStillCantFindIt") })
18008
17998
  ] }),
18009
17999
  titleId: "whereCanIFindTheseNumbersOnMyDriversLicense",
18010
- contentId: "whereToFindNumbersOnDriversLicense",
18011
- baseTrackingPayload
18000
+ contentId: "whereToFindNumbersOnDriversLicense"
18012
18001
  }
18013
18002
  )
18014
18003
  ] });
@@ -18172,8 +18161,7 @@ function IdentityNZComponent({
18172
18161
  fieldProblems
18173
18162
  )
18174
18163
  },
18175
- shouldValidate,
18176
- baseTrackingPayload: { task: TaskTypes.INDIVIDUAL }
18164
+ shouldValidate
18177
18165
  }
18178
18166
  ) : void 0
18179
18167
  ] });
@@ -18396,10 +18384,6 @@ function PersonalDetailsComponent(props) {
18396
18384
  }
18397
18385
  };
18398
18386
  const alertProps = getAlertProps();
18399
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
18400
- task: props.taskType,
18401
- ...isDecisionMakerTask ? { associatedLegalEntity: props.parentLegalEntity } : {}
18402
- });
18403
18387
  return /* @__PURE__ */ jsxs(LoaderWrapper, { status, formOpacityWhenLoading: 0.3, loaderSize: "large", children: [
18404
18388
  /* @__PURE__ */ jsx(StateContextSetter, { owner: PERSONAL_DETAILS, stateRef }),
18405
18389
  /* @__PURE__ */ jsx(StateContextWatcher, { owner: PERSONAL_DETAILS, onChange: handleStateChange }),
@@ -18431,12 +18415,10 @@ function PersonalDetailsComponent(props) {
18431
18415
  /* @__PURE__ */ jsx(
18432
18416
  ContextGuidance,
18433
18417
  {
18434
- page: "Personal details",
18435
18418
  title: i18n.get("whyDoINeedToFillInThisInformation"),
18436
18419
  content: i18n.get("reasonForFillingIndividualPersonalDetails"),
18437
18420
  titleId: "whyDoINeedToFillInThisInformation",
18438
- contentId: "reasonForFillingIndividualPersonalDetails",
18439
- baseTrackingPayload
18421
+ contentId: "reasonForFillingIndividualPersonalDetails"
18440
18422
  }
18441
18423
  ),
18442
18424
  isDecisionMakerTask && props.trustedFieldsProvider === TrustedFieldsProvider.SINGPASS && props.readOnlyFields && /* @__PURE__ */ jsx(Typography, { color: "secondary", variant: "caption", children: i18n.get(
@@ -18944,12 +18926,10 @@ function IndividualComponent(props) {
18944
18926
  /* @__PURE__ */ jsx(
18945
18927
  ContextGuidance,
18946
18928
  {
18947
- page: "Personal address",
18948
18929
  title: i18n.get("whyDoINeedToFillInThisInformation"),
18949
18930
  content: i18n.get("reasonForFillingIndividualAddressDetails"),
18950
18931
  titleId: "whyDoINeedToFillInThisInformation",
18951
- contentId: "reasonForFillingIndividualAddressDetails",
18952
- baseTrackingPayload: { task: taskType }
18932
+ contentId: "reasonForFillingIndividualAddressDetails"
18953
18933
  }
18954
18934
  ),
18955
18935
  /* @__PURE__ */ jsx(
@@ -19259,7 +19239,7 @@ var BankDocumentTypes = /* @__PURE__ */ ((BankDocumentTypes2) => {
19259
19239
  BankDocumentTypes2["BANK_STATEMENT"] = "bankStatement";
19260
19240
  BankDocumentTypes2["DEPOSIT_SLIP"] = "depositSlip";
19261
19241
  BankDocumentTypes2["SCREENSHOT_OF_BANK"] = "screenshotOfOnlineBankingEnviroment";
19262
- BankDocumentTypes2["OFFICIAL_EMAIL"] = "officialEmailOrALetterFromYourBank";
19242
+ BankDocumentTypes2["A_LETTER_FROM_YOUR_BANK"] = "aLetterFromYourBank";
19263
19243
  BankDocumentTypes2["CHECK"] = "check";
19264
19244
  return BankDocumentTypes2;
19265
19245
  })(BankDocumentTypes || {});
@@ -19267,7 +19247,7 @@ const bankDocumentOptions = [
19267
19247
  { id: "bankStatement", name: "bankStatementDocument" },
19268
19248
  { id: "depositSlip", name: "depositSlip" },
19269
19249
  { id: "screenshotOfOnlineBankingEnviroment", name: "screenshotOfOnlineBankingEnviroment" },
19270
- { id: "officialEmailOrALetterFromYourBank", name: "officialEmailOrALetterFromYourBank" },
19250
+ { id: "aLetterFromYourBank", name: "aLetterFromYourBank" },
19271
19251
  { id: "check", name: "check" }
19272
19252
  ];
19273
19253
  var BankDocumentRequirement = /* @__PURE__ */ ((BankDocumentRequirement2) => {
@@ -19381,7 +19361,7 @@ const getBankDocumentRequirements = (country, documentType, documentModifiers) =
19381
19361
  { key: BankDocumentRequirement.ROUTING_NUMBER }
19382
19362
  ] : [{ key: BankDocumentRequirement.ACCOUNT_NUMBER_OR_IBAN }];
19383
19363
  const requireLast12Months = documentType !== BankDocumentTypes.SCREENSHOT_OF_BANK;
19384
- const requireStampOrSignature = documentType === BankDocumentTypes.DEPOSIT_SLIP || documentType === BankDocumentTypes.OFFICIAL_EMAIL;
19364
+ const requireStampOrSignature = documentType === BankDocumentTypes.DEPOSIT_SLIP || documentType === BankDocumentTypes.A_LETTER_FROM_YOUR_BANK;
19385
19365
  const requirements = [
19386
19366
  applyNamedModifiers(country, documentModifiers),
19387
19367
  ...accountNumberRequirement,
@@ -22028,7 +22008,6 @@ function PayoutVerificationMethod(props) {
22028
22008
  !enablePreferInstantVerificationMethodFlow && providerName && bankVendorsLoadingStatus === "success" ? /* @__PURE__ */ jsx(
22029
22009
  ContextGuidance,
22030
22010
  {
22031
- page: "Instant verification with partner",
22032
22011
  titleId: "howDoesVerificationWithOurPartnerWorks",
22033
22012
  contentId: "bankVerificationWithPartnerSteps",
22034
22013
  title: i18n.get("howDoesVerificationWithOurPartnerWorks", {
@@ -22045,8 +22024,7 @@ function PayoutVerificationMethod(props) {
22045
22024
  ] }),
22046
22025
  /* @__PURE__ */ jsx(Typography, { children: i18n.get("adyenWillOnlyGetTemporaryAccess") }),
22047
22026
  /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy", external: true, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: i18n.get("learnMore") }) })
22048
- ] }),
22049
- baseTrackingPayload: { task: TaskTypes.PAYOUT }
22027
+ ] })
22050
22028
  }
22051
22029
  ) : void 0
22052
22030
  ] });
@@ -22416,8 +22394,7 @@ function SolePropComponent(props) {
22416
22394
  country: props.country,
22417
22395
  problems: props == null ? void 0 : props.problems,
22418
22396
  handleAddressSearch: props.handleAddressSearch,
22419
- handleFindAddress: props.handleFindAddress,
22420
- baseTrackingPayload: { task: TaskTypes.SOLE_PROPRIETOR_COMPANY }
22397
+ handleFindAddress: props.handleFindAddress
22421
22398
  }
22422
22399
  )
22423
22400
  }
@@ -23364,8 +23341,7 @@ function TrustComponent(props) {
23364
23341
  problems: props == null ? void 0 : props.problems,
23365
23342
  labels: { operationalAddressIsSame: "isTrustOperationAddressSame" },
23366
23343
  handleAddressSearch: props.handleAddressSearch,
23367
- handleFindAddress: props.handleFindAddress,
23368
- baseTrackingPayload: { task: TaskTypes.TRUST }
23344
+ handleFindAddress: props.handleFindAddress
23369
23345
  }
23370
23346
  )
23371
23347
  }
@@ -24058,14 +24034,14 @@ const trackNavigation = ({
24058
24034
  toForm,
24059
24035
  label,
24060
24036
  returnValue,
24061
- baseTrackingPayload
24037
+ additionalTrackingParams
24062
24038
  }) => {
24063
24039
  userEvents.addPageEvent("Clicked button", {
24064
24040
  actionType,
24065
24041
  toPage: toForm,
24066
24042
  label,
24067
24043
  returnValue,
24068
- ...baseTrackingPayload
24044
+ ...additionalTrackingParams
24069
24045
  });
24070
24046
  };
24071
24047
  const useHideButton = (condition, setHideState) => {
@@ -24093,7 +24069,7 @@ const getOpeningStep = (forms, remediationActions) => {
24093
24069
  };
24094
24070
  const useFormComposer = ({
24095
24071
  problems,
24096
- baseTrackingPayload,
24072
+ navigationTrackingParams,
24097
24073
  forms,
24098
24074
  formRef,
24099
24075
  submitButtonLabel,
@@ -24123,7 +24099,7 @@ const useFormComposer = ({
24123
24099
  }, [forms]);
24124
24100
  useEffect(() => {
24125
24101
  userEvents.updateSharedEventProperties({ page: activeForm.formName });
24126
- }, [activeForm]);
24102
+ }, [activeForm.formName]);
24127
24103
  useEffect(() => {
24128
24104
  if (hasAlreadyNavigatedForm) return;
24129
24105
  const openingStep = getOpeningStep(forms, problems == null ? void 0 : problems.remediationActions);
@@ -24147,8 +24123,16 @@ const useFormComposer = ({
24147
24123
  const validateCurrentForm = () => {
24148
24124
  setShouldValidate(true);
24149
24125
  };
24126
+ const trackSubmitClick = () => {
24127
+ trackNavigation({
24128
+ actionType: "submit",
24129
+ label: "submit",
24130
+ additionalTrackingParams: navigationTrackingParams
24131
+ });
24132
+ };
24150
24133
  const handleNextClick = () => {
24151
24134
  if (isFormSummaryStep(activeForm)) {
24135
+ trackSubmitClick();
24152
24136
  if (skipSubmit) {
24153
24137
  onSkipSubmit == null ? void 0 : onSkipSubmit();
24154
24138
  } else {
@@ -24162,11 +24146,12 @@ const useFormComposer = ({
24162
24146
  actionType: "next",
24163
24147
  label: "next",
24164
24148
  returnValue: "validation error",
24165
- baseTrackingPayload
24149
+ additionalTrackingParams: navigationTrackingParams
24166
24150
  });
24167
24151
  return;
24168
24152
  }
24169
24153
  if (isFinalStep) {
24154
+ trackSubmitClick();
24170
24155
  onSubmit();
24171
24156
  return;
24172
24157
  }
@@ -24178,7 +24163,7 @@ const useFormComposer = ({
24178
24163
  toForm: forms[toFormIndex].formName,
24179
24164
  label: "next",
24180
24165
  returnValue: "success",
24181
- baseTrackingPayload
24166
+ additionalTrackingParams: navigationTrackingParams
24182
24167
  });
24183
24168
  };
24184
24169
  const handleBackClick = () => {
@@ -24190,7 +24175,7 @@ const useFormComposer = ({
24190
24175
  actionType: "back",
24191
24176
  toForm: toForm.formName,
24192
24177
  label: "back",
24193
- baseTrackingPayload
24178
+ additionalTrackingParams: navigationTrackingParams
24194
24179
  });
24195
24180
  }
24196
24181
  };
@@ -26657,7 +26642,6 @@ function BusinessDetailsComponent(props) {
26657
26642
  country,
26658
26643
  isTopLevelEntity,
26659
26644
  activeForm,
26660
- baseTrackingPayload,
26661
26645
  showCompanyStructure,
26662
26646
  showBusinessSelection,
26663
26647
  setShowBusinessSelection,
@@ -26690,7 +26674,6 @@ function BusinessDetailsComponent(props) {
26690
26674
  id: forms.basicInformation.formId,
26691
26675
  heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) || forms.basicInformation.formHeading),
26692
26676
  description: (activeForm == null ? void 0 : activeForm.formDescription) ? i18n.get(activeForm == null ? void 0 : activeForm.formDescription) : void 0,
26693
- baseTrackingPayload,
26694
26677
  country,
26695
26678
  companyType: companyStructure == null ? void 0 : companyStructure.entityType,
26696
26679
  isTopLevelEntity,
@@ -27727,7 +27710,7 @@ const FormWrapper = ({
27727
27710
  activeForm,
27728
27711
  handleGetIdVerificationToken,
27729
27712
  validateForm,
27730
- baseTrackingPayload,
27713
+ navigationTrackingParams,
27731
27714
  hideDropinLayout,
27732
27715
  hideFooter,
27733
27716
  hideHomeButton,
@@ -27747,7 +27730,14 @@ const FormWrapper = ({
27747
27730
  const { data: summaryData, omittedForms, omittedKeys, labels: labels2 } = summary2 || {};
27748
27731
  const [isOpen, setIsOpen] = useState(true);
27749
27732
  const [finishLaterLoading, setFinishLaterLoading] = useState(false);
27733
+ const translationKeys = {
27734
+ saveAndGoToOverview: "saveAndGoToOverview"
27735
+ };
27750
27736
  const onHomeClick = () => {
27737
+ userEvents.addPageEvent("Clicked button", {
27738
+ actionType: "save",
27739
+ label: translationKeys.saveAndGoToOverview
27740
+ });
27751
27741
  if (canSubmit2) {
27752
27742
  onSubmit();
27753
27743
  } else {
@@ -27766,10 +27756,10 @@ const FormWrapper = ({
27766
27756
  (props) => {
27767
27757
  trackNavigation({
27768
27758
  ...props,
27769
- baseTrackingPayload
27759
+ additionalTrackingParams: navigationTrackingParams
27770
27760
  });
27771
27761
  },
27772
- [baseTrackingPayload]
27762
+ [navigationTrackingParams]
27773
27763
  );
27774
27764
  const summaryContent = /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: /* @__PURE__ */ jsx(
27775
27765
  Summary,
@@ -27787,6 +27777,10 @@ const FormWrapper = ({
27787
27777
  }
27788
27778
  ) });
27789
27779
  const handleFinishLater = () => {
27780
+ userEvents.addPageEvent("Clicked button", {
27781
+ actionType: "save",
27782
+ label: translationKeys.saveAndGoToOverview
27783
+ });
27790
27784
  setFinishLaterLoading(true);
27791
27785
  onSubmit().then(() => {
27792
27786
  setIsOpen(false);
@@ -28143,7 +28137,7 @@ async function submitDocuments({
28143
28137
  legalEntity,
28144
28138
  forms,
28145
28139
  documentUtils,
28146
- baseTrackingPayload
28140
+ additionalTrackingParams
28147
28141
  }) {
28148
28142
  if (!isDocumentsRequired$2(forms)) return;
28149
28143
  const logger2 = createLogger("submitDocuments");
@@ -28154,7 +28148,7 @@ async function submitDocuments({
28154
28148
  formattedDocument.forEach((doc) => {
28155
28149
  var _a;
28156
28150
  userEvents.addEvent("Success", {
28157
- ...baseTrackingPayload,
28151
+ ...additionalTrackingParams,
28158
28152
  actionLevel: "task",
28159
28153
  actionType: "upload",
28160
28154
  documentType: doc.type,
@@ -28165,7 +28159,7 @@ async function submitDocuments({
28165
28159
  } catch (err) {
28166
28160
  logger2.error(err);
28167
28161
  userEvents.addEvent("Encountered error", {
28168
- ...baseTrackingPayload,
28162
+ ...additionalTrackingParams,
28169
28163
  actionLevel: "task",
28170
28164
  actionType: "upload",
28171
28165
  returnType: err.errorCode,
@@ -28176,7 +28170,7 @@ async function submitDocuments({
28176
28170
  async function submit({
28177
28171
  data,
28178
28172
  legalEntityResponse,
28179
- baseTrackingPayload,
28173
+ additionalTrackingParams,
28180
28174
  forms,
28181
28175
  problems,
28182
28176
  documentUtils,
@@ -28193,7 +28187,7 @@ async function submit({
28193
28187
  const logger2 = createLogger("submitBusinessDetails");
28194
28188
  setLoadingStatus("loading");
28195
28189
  const trackingPayload = {
28196
- ...baseTrackingPayload,
28190
+ ...additionalTrackingParams,
28197
28191
  actionLevel: "task",
28198
28192
  actionType: "submit",
28199
28193
  companyStructure: ((_a = data.companyStructure) == null ? void 0 : _a.entityType) ?? null,
@@ -28212,7 +28206,6 @@ async function submit({
28212
28206
  )
28213
28207
  };
28214
28208
  try {
28215
- userEvents.addEvent("Clicked button", trackingPayload);
28216
28209
  await Promise.all([
28217
28210
  handleUpdateLegalEntity(drop("type").from(legalEntity), legalEntityResponse.id),
28218
28211
  submitDocuments({
@@ -28222,7 +28215,7 @@ async function submit({
28222
28215
  id: legalEntityResponse.id,
28223
28216
  type: LegalEntityType.ORGANIZATION
28224
28217
  },
28225
- baseTrackingPayload,
28218
+ additionalTrackingParams,
28226
28219
  documentUtils,
28227
28220
  forms
28228
28221
  })
@@ -28289,12 +28282,11 @@ function BusinessDetailsDropinComponent({
28289
28282
  const {
28290
28283
  state: { currentState }
28291
28284
  } = useStateContext();
28292
- const baseTrackingPayload = useMemo(
28285
+ const associatedLeTrackingParams = useMemo(
28293
28286
  () => getAssociatedLeAnalyticsPayload({
28294
- task: taskType,
28295
28287
  associatedLegalEntity: parentLegalEntity
28296
28288
  }),
28297
- [parentLegalEntity, taskType]
28289
+ [parentLegalEntity]
28298
28290
  );
28299
28291
  useEffect(() => {
28300
28292
  onChange == null ? void 0 : onChange(currentState);
@@ -28302,9 +28294,9 @@ function BusinessDetailsDropinComponent({
28302
28294
  useEffect(() => {
28303
28295
  userEvents.updateBaseTrackingPayload({ task: taskType });
28304
28296
  userEvents.addEvent("Landed on page", {
28305
- ...baseTrackingPayload,
28306
28297
  actionLevel: "task",
28307
- actionType: "start"
28298
+ actionType: "start",
28299
+ ...associatedLeTrackingParams
28308
28300
  });
28309
28301
  }, []);
28310
28302
  const formRef = useRef(null);
@@ -28448,7 +28440,7 @@ function BusinessDetailsDropinComponent({
28448
28440
  data: currentState.data,
28449
28441
  legalEntityResponse,
28450
28442
  isTargetLegalEntityType: Boolean(isTargetLegalEntityType),
28451
- baseTrackingPayload,
28443
+ additionalTrackingParams: associatedLeTrackingParams,
28452
28444
  problems: currentProblems,
28453
28445
  forms,
28454
28446
  documentUtils,
@@ -28466,7 +28458,7 @@ function BusinessDetailsDropinComponent({
28466
28458
  currentState.data,
28467
28459
  legalEntityResponse,
28468
28460
  isTargetLegalEntityType,
28469
- baseTrackingPayload,
28461
+ associatedLeTrackingParams,
28470
28462
  currentProblems,
28471
28463
  forms,
28472
28464
  documentUtils,
@@ -28488,7 +28480,7 @@ function BusinessDetailsDropinComponent({
28488
28480
  nextButtonLabel
28489
28481
  } = useFormComposer({
28490
28482
  problems: currentProblems,
28491
- baseTrackingPayload,
28483
+ navigationTrackingParams: associatedLeTrackingParams,
28492
28484
  forms,
28493
28485
  formRef,
28494
28486
  onSubmit: submitTask
@@ -28742,7 +28734,7 @@ function BusinessDetailsDropinComponent({
28742
28734
  forms,
28743
28735
  activeForm,
28744
28736
  validateForm: () => setShouldValidate(true),
28745
- baseTrackingPayload,
28737
+ navigationTrackingParams: associatedLeTrackingParams,
28746
28738
  onSubmit: submitTask,
28747
28739
  problems: currentProblems,
28748
28740
  canSubmit: canSubmitForm,
@@ -28764,7 +28756,6 @@ function BusinessDetailsDropinComponent({
28764
28756
  activeForm,
28765
28757
  shouldValidate,
28766
28758
  isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS,
28767
- baseTrackingPayload,
28768
28759
  showBusinessSelection,
28769
28760
  setShowBusinessSelection,
28770
28761
  showCompanyStructure,
@@ -28864,17 +28855,14 @@ function CompanyDropinComponent({
28864
28855
  );
28865
28856
  const [loadingStatus, setLoadingStatus] = useState("success");
28866
28857
  const formRef = useRef(null);
28867
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
28868
- task: taskType,
28869
- ...isTrustMemberCompany ? {
28870
- associatedLegalEntity: legalEntityResponse,
28871
- associatedLegalEntityOrg: parentLegalEntity
28872
- } : {}
28873
- });
28858
+ const associatedLeTrackingParams = isTrustMemberCompany ? getAssociatedLeAnalyticsPayload({
28859
+ associatedLegalEntity: legalEntityResponse,
28860
+ associatedLegalEntityOrg: parentLegalEntity
28861
+ }) : {};
28874
28862
  useEffect(() => {
28875
28863
  userEvents.updateBaseTrackingPayload({ task: taskType });
28876
28864
  userEvents.addEvent("Landed on page", {
28877
- ...baseTrackingPayload,
28865
+ ...associatedLeTrackingParams,
28878
28866
  actionLevel: "task",
28879
28867
  actionType: "start"
28880
28868
  });
@@ -28959,7 +28947,7 @@ function CompanyDropinComponent({
28959
28947
  await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
28960
28948
  formattedDocument.forEach((doc) => {
28961
28949
  userEvents.addEvent("Success", {
28962
- ...baseTrackingPayload,
28950
+ ...associatedLeTrackingParams,
28963
28951
  actionLevel: "task",
28964
28952
  actionType: "save",
28965
28953
  documentType: doc.type,
@@ -29012,10 +29000,6 @@ function CompanyDropinComponent({
29012
29000
  delete legalEntity.organization.countryOfGoverningLaw;
29013
29001
  }
29014
29002
  try {
29015
- userEvents.addEvent("Clicked button", {
29016
- ...baseTrackingPayload,
29017
- ...companyTrackingPayload
29018
- });
29019
29003
  if (!(legalEntityResponse == null ? void 0 : legalEntityResponse.id)) {
29020
29004
  legalEntity = await handleCreateLegalEntity(legalEntity);
29021
29005
  } else {
@@ -29026,7 +29010,7 @@ function CompanyDropinComponent({
29026
29010
  }
29027
29011
  setAccountHolder(accountHolder);
29028
29012
  userEvents.addEvent("Success", {
29029
- ...baseTrackingPayload,
29013
+ ...associatedLeTrackingParams,
29030
29014
  ...companyTrackingPayload,
29031
29015
  legalEntityId: legalEntity.id,
29032
29016
  entityType: legalEntity.type
@@ -29052,7 +29036,7 @@ function CompanyDropinComponent({
29052
29036
  }
29053
29037
  setLoadingStatus("success");
29054
29038
  userEvents.addEvent("Encountered error", {
29055
- ...baseTrackingPayload,
29039
+ ...associatedLeTrackingParams,
29056
29040
  actionLevel: "task",
29057
29041
  actionType: "submit",
29058
29042
  returnType: e.errorCode,
@@ -29183,7 +29167,7 @@ function CompanyDropinComponent({
29183
29167
  nextButtonLabel
29184
29168
  } = useFormComposer({
29185
29169
  problems,
29186
- baseTrackingPayload,
29170
+ navigationTrackingParams: associatedLeTrackingParams,
29187
29171
  forms,
29188
29172
  formRef,
29189
29173
  onSubmit
@@ -29205,7 +29189,7 @@ function CompanyDropinComponent({
29205
29189
  forms,
29206
29190
  activeForm,
29207
29191
  validateForm: () => setShouldValidate(true),
29208
- baseTrackingPayload,
29192
+ navigationTrackingParams: associatedLeTrackingParams,
29209
29193
  onSubmit,
29210
29194
  problems,
29211
29195
  canSubmit: canSubmit$1(data) && hasDataChanged(dataFromResponse, data),
@@ -30123,8 +30107,7 @@ const BusinessTypeSelection = ({
30123
30107
  if (loadingStatus === "loading") return;
30124
30108
  triggerValidation();
30125
30109
  if (isValid) {
30126
- userEvents.addEvent("Clicked button", {
30127
- actionLevel: "task",
30110
+ userEvents.addPageEvent("Clicked button", {
30128
30111
  actionType: "next"
30129
30112
  });
30130
30113
  if (((_a2 = data.businessType) == null ? void 0 : _a2.id) === "legalArrangement") {
@@ -30905,7 +30888,6 @@ const DecisionMakersComponent = ({
30905
30888
  /* @__PURE__ */ jsx(
30906
30889
  ContextGuidance,
30907
30890
  {
30908
- page: "Decision makers",
30909
30891
  title: i18n.get("whatIsTheDifferenceBetweenTheseRoles"),
30910
30892
  content: /* @__PURE__ */ jsx("ul", { className: "adyen-kyc-guidance-list", children: availableDecisionMakers.map(({ roleType }) => /* @__PURE__ */ jsx(
30911
30893
  "li",
@@ -30920,8 +30902,7 @@ const DecisionMakersComponent = ({
30920
30902
  roleType
30921
30903
  )) }),
30922
30904
  titleId: "whatIsTheDifferenceBetweenTheseRoles",
30923
- contentId: "differenceBetweenAnOwnerControllingPersonAndSignatory",
30924
- baseTrackingPayload: { task: TaskTypes.DECISION_MAKER_OVERVIEW }
30905
+ contentId: "differenceBetweenAnOwnerControllingPersonAndSignatory"
30925
30906
  }
30926
30907
  ),
30927
30908
  showWarning && /* @__PURE__ */ jsx(
@@ -32382,7 +32363,6 @@ const TrustMembersOverview = ({
32382
32363
  /* @__PURE__ */ jsx(
32383
32364
  ContextGuidance,
32384
32365
  {
32385
- page: "Trust members",
32386
32366
  title: i18n.get("whatIsTheDifferenceBetweenTheseRoles"),
32387
32367
  content: /* @__PURE__ */ jsx("ul", { className: "adyen-kyc-guidance-list", children: trustMemberRequirements.map(({ label }) => /* @__PURE__ */ jsx(
32388
32368
  "li",
@@ -32394,8 +32374,7 @@ const TrustMembersOverview = ({
32394
32374
  label
32395
32375
  )) }),
32396
32376
  titleId: "whatIsTheDifferenceBetweenTheseRoles",
32397
- contentId: "differenceBetweenTrustMemberRoles",
32398
- baseTrackingPayload: { task: TaskTypes.TRUST_MEMBER_OVERVIEW }
32377
+ contentId: "differenceBetweenTrustMemberRoles"
32399
32378
  }
32400
32379
  ),
32401
32380
  /* @__PURE__ */ jsx(CardGroup, { children: trustMembers.map((trustMember) => {
@@ -32643,20 +32622,14 @@ function IndividualDropinComponent({
32643
32622
  accountHolder,
32644
32623
  handleOpenSingpassAuthorizationLink
32645
32624
  });
32646
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
32647
- task: taskType,
32648
- ...taskType === TaskTypes.INDIVIDUAL ? {} : taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER ? {
32649
- associatedLegalEntity: legalEntityResponse,
32650
- associatedLegalEntityOrg: parentLegalEntity
32651
- } : {
32652
- // i.e. legal arrangement, decision maker, or trust member individual
32653
- associatedLegalEntity: legalEntityResponse
32654
- }
32625
+ const associatedLeTrackingParams = taskType === TaskTypes.INDIVIDUAL ? {} : getAssociatedLeAnalyticsPayload({
32626
+ associatedLegalEntity: legalEntityResponse,
32627
+ associatedLegalEntityOrg: taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER ? parentLegalEntity : void 0
32655
32628
  });
32656
32629
  useEffect(() => {
32657
32630
  userEvents.updateBaseTrackingPayload({ task: taskType });
32658
32631
  userEvents.addEvent("Landed on page", {
32659
- ...baseTrackingPayload,
32632
+ ...associatedLeTrackingParams,
32660
32633
  actionLevel: "task",
32661
32634
  actionType: "start"
32662
32635
  });
@@ -32789,7 +32762,7 @@ function IndividualDropinComponent({
32789
32762
  }
32790
32763
  updatedLegalEntity = await handleCreateLegalEntity(legalEntity);
32791
32764
  userEvents.addEvent("Success", {
32792
- ...baseTrackingPayload,
32765
+ ...associatedLeTrackingParams,
32793
32766
  actionLevel: "task",
32794
32767
  actionType: "submit",
32795
32768
  legalEntityId: updatedLegalEntity.id,
@@ -32800,7 +32773,7 @@ function IndividualDropinComponent({
32800
32773
  } else {
32801
32774
  updatedLegalEntity = await handleUpdateLegalEntity(drop("type").from(legalEntity), leId);
32802
32775
  userEvents.addEvent("Success", {
32803
- ...baseTrackingPayload,
32776
+ ...associatedLeTrackingParams,
32804
32777
  actionLevel: "task",
32805
32778
  actionType: "submit",
32806
32779
  legalEntityId: updatedLegalEntity.id,
@@ -32842,7 +32815,7 @@ function IndividualDropinComponent({
32842
32815
  uploadedDocuments == null ? void 0 : uploadedDocuments.forEach((doc) => {
32843
32816
  var _a3;
32844
32817
  userEvents.addEvent("Success", {
32845
- ...baseTrackingPayload,
32818
+ ...associatedLeTrackingParams,
32846
32819
  actionLevel: "task",
32847
32820
  actionType: "upload",
32848
32821
  documentType: doc.type,
@@ -32895,7 +32868,7 @@ function IndividualDropinComponent({
32895
32868
  }
32896
32869
  };
32897
32870
  const onSubmit = async () => {
32898
- var _a2, _b2;
32871
+ var _a2;
32899
32872
  setLoadingStatus("loading");
32900
32873
  const dataSubmitted = omitObscuredFieldsIfUnchanged(
32901
32874
  individualObscuredFields,
@@ -32913,13 +32886,6 @@ function IndividualDropinComponent({
32913
32886
  return ((_a3 = dataSubmitted == null ? void 0 : dataSubmitted.idDocument) == null ? void 0 : _a3.idDocumentType) === id;
32914
32887
  }
32915
32888
  )) == null ? void 0 : _a2.id;
32916
- userEvents.addEvent("Clicked button", {
32917
- ...baseTrackingPayload,
32918
- actionLevel: "task",
32919
- actionType: "submit",
32920
- countryOfRegistration: ((_b2 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _b2.residencyCountry) || null,
32921
- documentType: idDocumentType || null
32922
- });
32923
32889
  legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(
32924
32890
  taskType,
32925
32891
  legalEntityResponse,
@@ -32958,7 +32924,7 @@ function IndividualDropinComponent({
32958
32924
  }
32959
32925
  setLoadingStatus("success");
32960
32926
  userEvents.addEvent("Encountered error", {
32961
- ...baseTrackingPayload,
32927
+ ...associatedLeTrackingParams,
32962
32928
  actionLevel: "task",
32963
32929
  actionType: "submit",
32964
32930
  returnType: e.errorCode,
@@ -33069,7 +33035,7 @@ function IndividualDropinComponent({
33069
33035
  totalSteps
33070
33036
  } = useFormComposer({
33071
33037
  problems,
33072
- baseTrackingPayload,
33038
+ navigationTrackingParams: associatedLeTrackingParams,
33073
33039
  externalBackClick,
33074
33040
  forms,
33075
33041
  formRef,
@@ -33094,7 +33060,7 @@ function IndividualDropinComponent({
33094
33060
  loadingStatus,
33095
33061
  forms,
33096
33062
  onSubmit,
33097
- baseTrackingPayload,
33063
+ navigationTrackingParams: associatedLeTrackingParams,
33098
33064
  handleGetIdVerificationToken,
33099
33065
  gotoFormByFormIndex,
33100
33066
  nextButtonLabel,
@@ -33520,7 +33486,6 @@ function PayoutDetailsDropinComponent({
33520
33486
  bankCountry: (payoutVerificationMethod == null ? void 0 : payoutVerificationMethod.bankCountry) ?? defaultPayoutCountry,
33521
33487
  bankCurrency: (payoutAccountDetails == null ? void 0 : payoutAccountDetails.currency) ?? null
33522
33488
  };
33523
- userEvents.addEvent("Clicked button", baseTracking);
33524
33489
  let transferInstrument2 = mapPayoutAccountToTransferInstrument({
33525
33490
  data: dataSubmitted,
33526
33491
  legalEntity: legalEntityResponse
@@ -33629,7 +33594,6 @@ function PayoutDetailsDropinComponent({
33629
33594
  nextButtonLabel
33630
33595
  } = useFormComposer({
33631
33596
  problems,
33632
- baseTrackingPayload: {},
33633
33597
  forms,
33634
33598
  submitButtonLabel,
33635
33599
  externalBackClick,
@@ -33674,7 +33638,6 @@ function PayoutDetailsDropinComponent({
33674
33638
  loadingStatus,
33675
33639
  forms,
33676
33640
  onSubmit,
33677
- baseTrackingPayload: {},
33678
33641
  gotoFormByFormIndex,
33679
33642
  nextButtonLabel,
33680
33643
  homeButtonLabel,
@@ -33794,7 +33757,6 @@ function PciDropinComponent({
33794
33757
  actionType: "sign",
33795
33758
  label: translationKeys.sign
33796
33759
  };
33797
- userEvents.addEvent("Clicked button", baseTracking);
33798
33760
  triggerValidation();
33799
33761
  if (isValid) {
33800
33762
  try {
@@ -33822,18 +33784,16 @@ function PciDropinComponent({
33822
33784
  }
33823
33785
  };
33824
33786
  const goHome = () => {
33825
- userEvents.addEvent("Clicked button", {
33826
- actionLevel: "task",
33787
+ userEvents.addPageEvent("Clicked button", {
33827
33788
  actionType: "back",
33828
33789
  label: translationKeys.home
33829
33790
  });
33830
33791
  handleHomeClick();
33831
33792
  };
33832
33793
  const handleExpandSection = (title) => {
33833
- userEvents.addEvent("Clicked accordion", {
33834
- actionLevel: "task",
33794
+ userEvents.addFieldEvent("Clicked accordion", {
33835
33795
  actionType: "open",
33836
- label: title
33796
+ field: title
33837
33797
  });
33838
33798
  };
33839
33799
  useEffect(() => {
@@ -34820,7 +34780,6 @@ function ServiceAgreementDropinComponent({
34820
34780
  actionLevel: "task",
34821
34781
  actionType: "sign"
34822
34782
  };
34823
- userEvents.addEvent("Clicked button", { ...baseTracking, label: translationKeys.next });
34824
34783
  triggerValidation();
34825
34784
  if (loadingStatus === "loading" || !serviceAgreement || !data.signer) return;
34826
34785
  if (isValid) {
@@ -34853,8 +34812,7 @@ function ServiceAgreementDropinComponent({
34853
34812
  }
34854
34813
  };
34855
34814
  const goHome = () => {
34856
- userEvents.addEvent("Clicked button", {
34857
- actionLevel: "task",
34815
+ userEvents.addPageEvent("Clicked button", {
34858
34816
  actionType: "back",
34859
34817
  label: translationKeys.home
34860
34818
  });
@@ -35174,8 +35132,7 @@ function SolePropDropinComponent({
35174
35132
  const dataFromResponse = getDataWithDefaultAddress(legalEntityResponse, parentLegalEntity);
35175
35133
  const [data, setData] = useState(dataFromResponse);
35176
35134
  const country = ((_b = (_a = currentState.data) == null ? void 0 : _a.solePropNameAndCountry) == null ? void 0 : _b.country) || ((_c = dataFromResponse == null ? void 0 : dataFromResponse.solePropRegistrationAddress) == null ? void 0 : _c.registrationAddress.country) || externalCountry;
35177
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
35178
- task: taskType,
35135
+ const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
35179
35136
  associatedLegalEntity: legalEntityResponse
35180
35137
  });
35181
35138
  const getConfigurationData = useCallback(
@@ -35373,7 +35330,7 @@ function SolePropDropinComponent({
35373
35330
  nextButtonLabel
35374
35331
  } = useFormComposer({
35375
35332
  problems,
35376
- baseTrackingPayload,
35333
+ navigationTrackingParams: associatedLeTrackingParams,
35377
35334
  forms,
35378
35335
  formRef,
35379
35336
  onSubmit: handleOnSubmit
@@ -35397,7 +35354,7 @@ function SolePropDropinComponent({
35397
35354
  onSubmit: handleOnSubmit,
35398
35355
  validateForm: () => setShouldValidate(true),
35399
35356
  canSubmit: canSubmit(data) && hasDataChanged(dataFromResponse, data),
35400
- baseTrackingPayload,
35357
+ navigationTrackingParams: associatedLeTrackingParams,
35401
35358
  problems,
35402
35359
  summary: {
35403
35360
  data: formatDataForSummary2(data, forms),
@@ -35682,8 +35639,7 @@ function TrustDropinComponent({
35682
35639
  const value = getProp(data2, detail);
35683
35640
  return !isEmpty$1(value);
35684
35641
  });
35685
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
35686
- task: taskType,
35642
+ const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
35687
35643
  associatedLegalEntity: legalEntityResponse
35688
35644
  });
35689
35645
  const {
@@ -35696,7 +35652,7 @@ function TrustDropinComponent({
35696
35652
  nextButtonLabel
35697
35653
  } = useFormComposer({
35698
35654
  problems,
35699
- baseTrackingPayload,
35655
+ navigationTrackingParams: associatedLeTrackingParams,
35700
35656
  forms,
35701
35657
  formRef,
35702
35658
  onSubmit
@@ -35712,7 +35668,7 @@ function TrustDropinComponent({
35712
35668
  loadingStatus,
35713
35669
  forms,
35714
35670
  activeForm,
35715
- baseTrackingPayload,
35671
+ navigationTrackingParams: associatedLeTrackingParams,
35716
35672
  onSubmit,
35717
35673
  hideDropinLayout,
35718
35674
  handleHomeClick,
@@ -39084,7 +39040,7 @@ function UpdateLegalEntityForHighExposure({
39084
39040
  const value = getProp(data2, detail);
39085
39041
  return !isEmpty$1(value);
39086
39042
  });
39087
- const baseTrackingPayload = getAssociatedLeAnalyticsPayload({
39043
+ const associatedLeTrackingParams = getAssociatedLeAnalyticsPayload({
39088
39044
  associatedLegalEntity: parentLegalEntity
39089
39045
  });
39090
39046
  const {
@@ -39097,7 +39053,6 @@ function UpdateLegalEntityForHighExposure({
39097
39053
  nextButtonLabel
39098
39054
  } = useFormComposer({
39099
39055
  problems,
39100
- baseTrackingPayload,
39101
39056
  forms,
39102
39057
  formRef,
39103
39058
  onSubmit
@@ -39113,7 +39068,7 @@ function UpdateLegalEntityForHighExposure({
39113
39068
  loadingStatus,
39114
39069
  forms,
39115
39070
  activeForm,
39116
- baseTrackingPayload,
39071
+ navigationTrackingParams: associatedLeTrackingParams,
39117
39072
  onSubmit,
39118
39073
  hideDropinLayout,
39119
39074
  handleHomeClick,
@@ -39411,7 +39366,7 @@ const useAnalytics = async ({
39411
39366
  userEvents.subscribe((data) => {
39412
39367
  onUserEvent({
39413
39368
  ...data,
39414
- properties: { ...data.properties || {}, ...sessionData }
39369
+ properties: { ...sessionData, ...data.properties || {} }
39415
39370
  });
39416
39371
  });
39417
39372
  }
@@ -39712,7 +39667,7 @@ const ConfigurationApiProvider = ({
39712
39667
  }) => {
39713
39668
  const authContext = useAuthContext();
39714
39669
  const { isEmbeddedDropin, loadingContext } = authContext;
39715
- const sdkVersion = "2.62.0";
39670
+ const sdkVersion = "2.63.0";
39716
39671
  useAnalytics({
39717
39672
  onUserEvent,
39718
39673
  legalEntityId: rootLegalEntityId,
@@ -39877,6 +39832,9 @@ const I18nProvider = ({
39877
39832
  }),
39878
39833
  [loadedLocale, translations, customTranslations, allowedLocales]
39879
39834
  );
39835
+ useEffect(() => {
39836
+ userEvents.updateBaseTrackingPayload({ locale });
39837
+ }, [locale]);
39880
39838
  const contextValue = useMemo(
39881
39839
  () => ({
39882
39840
  i18n,
@@ -40385,7 +40343,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
40385
40343
  };
40386
40344
  const copyToClipboard = async () => {
40387
40345
  const toCopy = {
40388
- sdkVersion: "2.62.0",
40346
+ sdkVersion: "2.63.0",
40389
40347
  experiments: Object.fromEntries(allExperimentsWithValues),
40390
40348
  settings: Object.fromEntries(allSettingsWithValues)
40391
40349
  };
@@ -40450,7 +40408,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
40450
40408
  /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
40451
40409
  /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
40452
40410
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
40453
- /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.62.0" })
40411
+ /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.63.0" })
40454
40412
  ] }) }),
40455
40413
  /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
40456
40414
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),