@blotoutio/providers-google-analytics-4-sdk 0.40.0 → 0.41.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.
- package/index.cjs.js +7 -9
- package/index.js +7 -9
- package/index.mjs +7 -9
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -53,6 +53,7 @@ const initGA4 = (ID, executionContext) => {
|
|
|
53
53
|
const init = ({ manifest, userId, executionContext }) => {
|
|
54
54
|
if (!window ||
|
|
55
55
|
!manifest.variables ||
|
|
56
|
+
!manifest.variables['measurementId'] ||
|
|
56
57
|
manifest.variables['flowType'] === 'server') {
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
@@ -255,17 +256,14 @@ const getEvent = (eventName, data, eventId) => {
|
|
|
255
256
|
const handleTag = ({ data = {}, eventName, eventId, manifestVariables, }) => {
|
|
256
257
|
if (!eventName ||
|
|
257
258
|
!window.gtag ||
|
|
258
|
-
(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['
|
|
259
|
+
!(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['measurementId']) ||
|
|
260
|
+
manifestVariables['flowType'] === 'server') {
|
|
259
261
|
return;
|
|
260
262
|
}
|
|
261
263
|
const { event, eventData } = getEvent(eventName, data, eventId);
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
if (manifestVariables['debug'] === '1') {
|
|
267
|
-
eventData['debug_mode'] = true;
|
|
268
|
-
}
|
|
264
|
+
eventData['send_to'] = manifestVariables['measurementId'];
|
|
265
|
+
if (manifestVariables['debug'] === '1') {
|
|
266
|
+
eventData['debug_mode'] = true;
|
|
269
267
|
}
|
|
270
268
|
window.gtag('event', event, { ...eventData, app: 'blotout' });
|
|
271
269
|
};
|
|
@@ -301,7 +299,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
301
299
|
}
|
|
302
300
|
return {
|
|
303
301
|
loaded: isLoaded,
|
|
304
|
-
sdkVersion: "0.
|
|
302
|
+
sdkVersion: "0.41.0" ,
|
|
305
303
|
};
|
|
306
304
|
};
|
|
307
305
|
|
package/index.js
CHANGED
|
@@ -54,6 +54,7 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
54
54
|
const init = ({ manifest, userId, executionContext }) => {
|
|
55
55
|
if (!window ||
|
|
56
56
|
!manifest.variables ||
|
|
57
|
+
!manifest.variables['measurementId'] ||
|
|
57
58
|
manifest.variables['flowType'] === 'server') {
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
@@ -256,17 +257,14 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
256
257
|
const handleTag = ({ data = {}, eventName, eventId, manifestVariables, }) => {
|
|
257
258
|
if (!eventName ||
|
|
258
259
|
!window.gtag ||
|
|
259
|
-
(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['
|
|
260
|
+
!(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['measurementId']) ||
|
|
261
|
+
manifestVariables['flowType'] === 'server') {
|
|
260
262
|
return;
|
|
261
263
|
}
|
|
262
264
|
const { event, eventData } = getEvent(eventName, data, eventId);
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
if (manifestVariables['debug'] === '1') {
|
|
268
|
-
eventData['debug_mode'] = true;
|
|
269
|
-
}
|
|
265
|
+
eventData['send_to'] = manifestVariables['measurementId'];
|
|
266
|
+
if (manifestVariables['debug'] === '1') {
|
|
267
|
+
eventData['debug_mode'] = true;
|
|
270
268
|
}
|
|
271
269
|
window.gtag('event', event, { ...eventData, app: 'blotout' });
|
|
272
270
|
};
|
|
@@ -302,7 +300,7 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
302
300
|
}
|
|
303
301
|
return {
|
|
304
302
|
loaded: isLoaded,
|
|
305
|
-
sdkVersion: "0.
|
|
303
|
+
sdkVersion: "0.41.0" ,
|
|
306
304
|
};
|
|
307
305
|
};
|
|
308
306
|
|
package/index.mjs
CHANGED
|
@@ -51,6 +51,7 @@ const initGA4 = (ID, executionContext) => {
|
|
|
51
51
|
const init = ({ manifest, userId, executionContext }) => {
|
|
52
52
|
if (!window ||
|
|
53
53
|
!manifest.variables ||
|
|
54
|
+
!manifest.variables['measurementId'] ||
|
|
54
55
|
manifest.variables['flowType'] === 'server') {
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
@@ -253,17 +254,14 @@ const getEvent = (eventName, data, eventId) => {
|
|
|
253
254
|
const handleTag = ({ data = {}, eventName, eventId, manifestVariables, }) => {
|
|
254
255
|
if (!eventName ||
|
|
255
256
|
!window.gtag ||
|
|
256
|
-
(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['
|
|
257
|
+
!(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['measurementId']) ||
|
|
258
|
+
manifestVariables['flowType'] === 'server') {
|
|
257
259
|
return;
|
|
258
260
|
}
|
|
259
261
|
const { event, eventData } = getEvent(eventName, data, eventId);
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
if (manifestVariables['debug'] === '1') {
|
|
265
|
-
eventData['debug_mode'] = true;
|
|
266
|
-
}
|
|
262
|
+
eventData['send_to'] = manifestVariables['measurementId'];
|
|
263
|
+
if (manifestVariables['debug'] === '1') {
|
|
264
|
+
eventData['debug_mode'] = true;
|
|
267
265
|
}
|
|
268
266
|
window.gtag('event', event, { ...eventData, app: 'blotout' });
|
|
269
267
|
};
|
|
@@ -299,7 +297,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
299
297
|
}
|
|
300
298
|
return {
|
|
301
299
|
loaded: isLoaded,
|
|
302
|
-
sdkVersion: "0.
|
|
300
|
+
sdkVersion: "0.41.0" ,
|
|
303
301
|
};
|
|
304
302
|
};
|
|
305
303
|
|