aesirx-analytics 1.0.5 → 1.0.6
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/analytics.js +1 -1
- package/build/lib/bundles/bundle.esm.min.js +1 -1
- package/build/lib/bundles/bundle.esm.min.js.map +1 -1
- package/build/lib/cjs/analytics.js +6 -6
- package/build/lib/cjs/analytics.js.map +1 -1
- package/build/lib/cjs/utils/index.js +1 -1
- package/build/lib/cjs/utils/index.js.map +1 -1
- package/build/lib/esm/analytics.js +6 -6
- package/build/lib/esm/analytics.js.map +1 -1
- package/build/lib/esm/utils/index.js +1 -1
- package/build/lib/esm/utils/index.js.map +1 -1
- package/build/lib/types/index.min.js +1 -1
- package/package.json +5 -6
- package/src/analytics.js +7 -6
- package/src/utils/index.js +1 -1
package/src/analytics.js
CHANGED
@@ -125,17 +125,18 @@ const insertParam = (key, value) => {
|
|
125
125
|
|
126
126
|
const replaceUrl = () => {
|
127
127
|
const urlParams = new URLSearchParams(window.location.search);
|
128
|
-
const
|
129
|
-
const
|
128
|
+
const event_uuid = urlParams.get('event_uuid');
|
129
|
+
const visitor_uuid = urlParams.get('visitor_uuid');
|
130
130
|
|
131
131
|
let anchors = document.getElementsByTagName('a');
|
132
|
+
|
132
133
|
for (let i = 0; i < anchors.length; i++) {
|
133
|
-
const eventIdParams = getParameterByName('
|
134
|
-
const
|
134
|
+
const eventIdParams = getParameterByName('event_uuid', anchors[i].href);
|
135
|
+
const visitorIdParams = getParameterByName('visitor_uuid', anchors[i].href);
|
135
136
|
if (anchors[i].href) {
|
136
137
|
const url = new URL(anchors[i].href);
|
137
|
-
!eventIdParams &&
|
138
|
-
!
|
138
|
+
!eventIdParams && event_uuid && url.searchParams.append('event_uuid', event_uuid);
|
139
|
+
!visitorIdParams && visitor_uuid && url.searchParams.append('visitor_uuid', visitor_uuid);
|
139
140
|
anchors[i].href = url.href;
|
140
141
|
}
|
141
142
|
}
|
package/src/utils/index.js
CHANGED
@@ -26,7 +26,7 @@ const initTracker = async (endpoint, url, referrer, user_agent) => {
|
|
26
26
|
urlParams.get(key) && attributes.push({ name: key, value: urlParams.get(key) });
|
27
27
|
}
|
28
28
|
}
|
29
|
-
if (!urlParams.get('
|
29
|
+
if (!urlParams.get('event_uuid') && !urlParams.get('visitor_uuid')) {
|
30
30
|
let ip = '';
|
31
31
|
const response = await trackerService(createRequest(endpoint, 'init'), {
|
32
32
|
url: url,
|