@skyservice-developers/vue-dev-kit 1.2.6 → 1.2.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyservice-developers/vue-dev-kit",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Vue 2 and Vue 3 developer toolkit - components and helpers",
5
5
  "type": "module",
6
6
  "main": "./dist/vue3/vue-dev-kit.cjs",
@@ -115,6 +115,14 @@ const props = defineProps({
115
115
  type: String,
116
116
  default: "Останнє відвідування",
117
117
  },
118
+ trackPageName: {
119
+ type: String,
120
+ default: "",
121
+ },
122
+ trackPagePath: {
123
+ type: String,
124
+ default: "",
125
+ },
118
126
  });
119
127
 
120
128
  const emit = defineEmits(['back', 'navigate'])
@@ -125,6 +133,15 @@ const isDropdownOpen = ref(false)
125
133
  const localStorageItems = ref([])
126
134
  const parentLang = ref({})
127
135
 
136
+ // Track page visit in parent's componentStats
137
+ if (isInIframe() && props.trackPageName) {
138
+ window.parent.postMessage({
139
+ type: 'trackVisit',
140
+ name: props.trackPageName,
141
+ path: props.trackPagePath || `/${props.trackPageName}`,
142
+ }, '*')
143
+ }
144
+
128
145
  // Load translations from parent
129
146
  if (isInIframe()) {
130
147
  getParentWindowValue('lang').then((data) => {