@blotoutio/providers-google-analytics-4-sdk 0.22.0 → 0.22.1
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.js +7 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -19,7 +19,9 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
const init = ({ manifest, userId }) => {
|
|
22
|
-
if (!window ||
|
|
22
|
+
if (!window ||
|
|
23
|
+
!manifest.variables ||
|
|
24
|
+
manifest.variables['flowType'] === 'server') {
|
|
23
25
|
return;
|
|
24
26
|
}
|
|
25
27
|
if (!window.gtag) {
|
|
@@ -215,7 +217,9 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
215
217
|
}
|
|
216
218
|
};
|
|
217
219
|
const handleTag = ({ data = {}, eventName, eventId, manifestVariables, }) => {
|
|
218
|
-
if (!eventName ||
|
|
220
|
+
if (!eventName ||
|
|
221
|
+
!window.gtag ||
|
|
222
|
+
(manifestVariables === null || manifestVariables === void 0 ? void 0 : manifestVariables['flowType']) === 'server') {
|
|
219
223
|
return;
|
|
220
224
|
}
|
|
221
225
|
const { event, eventData } = getEvent(eventName, data, eventId);
|
|
@@ -261,7 +265,7 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
261
265
|
}
|
|
262
266
|
return {
|
|
263
267
|
loaded: isLoaded,
|
|
264
|
-
sdkVersion: "0.22.
|
|
268
|
+
sdkVersion: "0.22.1" ,
|
|
265
269
|
};
|
|
266
270
|
};
|
|
267
271
|
|