adata-ui 2.1.29 → 2.1.30

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.
@@ -51,6 +51,17 @@ function onBack(type: 'method' | 'kaspi') {
51
51
  }
52
52
  }
53
53
 
54
+ const userInfo = useState('user-info', () => ({}))
55
+
56
+ function pushReplenishmentEventToDataLayer() {
57
+ window.dataLayer?.push({
58
+ event: 'replenishment',
59
+ user_id: `${userInfo.value.id}`,
60
+ user_email: `${userInfo.value.email}`,
61
+ rep_amount: `${paymentSum.value}`,
62
+ })
63
+ }
64
+
54
65
  async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
55
66
  methodSidePanel.value = false
56
67
  if (bank === 'kaspi') {
@@ -79,6 +90,7 @@ async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
79
90
  }
80
91
  else if (bank === 'other') {
81
92
  await payByCard(sum)
93
+ pushReplenishmentEventToDataLayer()
82
94
  }
83
95
  }
84
96
 
@@ -95,6 +107,7 @@ async function updateUserRate() {
95
107
  // rate_code: 'basic_plus',
96
108
  // },
97
109
  // })
110
+ pushReplenishmentEventToDataLayer()
98
111
  window.location.reload()
99
112
  }
100
113
  catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.1.29",
4
+ "version": "2.1.30",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",