@blotoutio/providers-google-analytics-4-sdk 0.57.0 → 0.58.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 +11 -2
- package/index.js +11 -2
- package/index.mjs +11 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -327,13 +327,22 @@ const getCookieValue = (key) => {
|
|
|
327
327
|
};
|
|
328
328
|
|
|
329
329
|
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
330
|
-
|
|
330
|
+
let isLoaded;
|
|
331
|
+
if (manifestVariables['flowType'] === 'browser') {
|
|
332
|
+
isLoaded = true;
|
|
333
|
+
}
|
|
334
|
+
else if (manifestVariables['flowType'] === 'server') {
|
|
335
|
+
isLoaded = false;
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
isLoaded = window && window.gtag && !!getCookieValue('_ga');
|
|
339
|
+
}
|
|
331
340
|
if (isLoaded) {
|
|
332
341
|
handleTag({ data, eventName, manifestVariables, eventId });
|
|
333
342
|
}
|
|
334
343
|
return {
|
|
335
344
|
loaded: isLoaded,
|
|
336
|
-
sdkVersion: "0.
|
|
345
|
+
sdkVersion: "0.58.0" ,
|
|
337
346
|
};
|
|
338
347
|
};
|
|
339
348
|
|
package/index.js
CHANGED
|
@@ -328,13 +328,22 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
328
328
|
};
|
|
329
329
|
|
|
330
330
|
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
331
|
-
|
|
331
|
+
let isLoaded;
|
|
332
|
+
if (manifestVariables['flowType'] === 'browser') {
|
|
333
|
+
isLoaded = true;
|
|
334
|
+
}
|
|
335
|
+
else if (manifestVariables['flowType'] === 'server') {
|
|
336
|
+
isLoaded = false;
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
isLoaded = window && window.gtag && !!getCookieValue('_ga');
|
|
340
|
+
}
|
|
332
341
|
if (isLoaded) {
|
|
333
342
|
handleTag({ data, eventName, manifestVariables, eventId });
|
|
334
343
|
}
|
|
335
344
|
return {
|
|
336
345
|
loaded: isLoaded,
|
|
337
|
-
sdkVersion: "0.
|
|
346
|
+
sdkVersion: "0.58.0" ,
|
|
338
347
|
};
|
|
339
348
|
};
|
|
340
349
|
|
package/index.mjs
CHANGED
|
@@ -325,13 +325,22 @@ const getCookieValue = (key) => {
|
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
328
|
-
|
|
328
|
+
let isLoaded;
|
|
329
|
+
if (manifestVariables['flowType'] === 'browser') {
|
|
330
|
+
isLoaded = true;
|
|
331
|
+
}
|
|
332
|
+
else if (manifestVariables['flowType'] === 'server') {
|
|
333
|
+
isLoaded = false;
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
isLoaded = window && window.gtag && !!getCookieValue('_ga');
|
|
337
|
+
}
|
|
329
338
|
if (isLoaded) {
|
|
330
339
|
handleTag({ data, eventName, manifestVariables, eventId });
|
|
331
340
|
}
|
|
332
341
|
return {
|
|
333
342
|
loaded: isLoaded,
|
|
334
|
-
sdkVersion: "0.
|
|
343
|
+
sdkVersion: "0.58.0" ,
|
|
335
344
|
};
|
|
336
345
|
};
|
|
337
346
|
|