adata-ui 3.1.83 → 3.1.84

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/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
7
  "failOnWarn": false,
8
- "version": "3.1.83",
8
+ "version": "3.1.84",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
11
  "unbuild": "3.5.0"
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { removeTrailingSlash } from "#adata-ui/utils/removeTrailingSlash";
3
3
  import { ref } from "vue";
4
- import { useAppConfig, useCookie, useI18n, useNuxtApp } from "#imports";
4
+ import { useAppConfig, useCookie, useI18n, useNuxtApp, useState } from "#imports";
5
5
  import PaymentKaspiQrSidePanel from "#adata-ui/components/payment/process/PaymentKaspiQrSidePanel.vue";
6
6
  import PaymentMethodSidePanel from "#adata-ui/components/payment/process/PaymentMethodSidePanel.vue";
7
7
  import PaymentTopUpSidePanel from "#adata-ui/components/payment/process/PaymentTopUpSidePanel.vue";
@@ -44,6 +44,15 @@ function onBack(type) {
44
44
  methodSidePanel.value = true;
45
45
  }
46
46
  }
47
+ const userInfo = useState("user-info", () => ({}));
48
+ function pushReplenishmentEventToDataLayer() {
49
+ window.dataLayer?.push({
50
+ event: "replenishment",
51
+ user_id: `${userInfo.value.id}`,
52
+ user_email: `${userInfo.value.email}`,
53
+ rep_amount: `${paymentSum.value}`
54
+ });
55
+ }
47
56
  async function directionsBanks(bank, sum) {
48
57
  methodSidePanel.value = false;
49
58
  if (bank === "kaspi") {
@@ -70,10 +79,12 @@ async function directionsBanks(bank, sum) {
70
79
  }
71
80
  } else if (bank === "other") {
72
81
  await payByCard(sum);
82
+ pushReplenishmentEventToDataLayer();
73
83
  }
74
84
  }
75
85
  async function updateUserRate() {
76
86
  try {
87
+ pushReplenishmentEventToDataLayer();
77
88
  window.location.reload();
78
89
  } catch (error) {
79
90
  $toast.error(error.data.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "3.1.83",
3
+ "version": "3.1.84",
4
4
  "description": "Adata UI",
5
5
  "repository": "your-org/my-module",
6
6
  "license": "MIT",