@blotoutio/providers-google-analytics-4-sdk 1.43.0 → 1.44.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 +6 -4
- package/index.js +6 -4
- package/index.mjs +6 -4
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -12,8 +12,8 @@ const hasUserConsentForProvider = (consent, provider) => {
|
|
|
12
12
|
var _a, _b;
|
|
13
13
|
let allowed = false;
|
|
14
14
|
if (isRecord(consent === null || consent === void 0 ? void 0 : consent.consent)) {
|
|
15
|
-
allowed = isBool(consent.consent
|
|
16
|
-
if (provider in consent) {
|
|
15
|
+
allowed = isBool(consent.consent['all']) ? consent.consent['all'] : false;
|
|
16
|
+
if (provider in consent.consent) {
|
|
17
17
|
const providerSpecific = consent.consent[provider];
|
|
18
18
|
if (isBool(providerSpecific)) {
|
|
19
19
|
allowed = providerSpecific;
|
|
@@ -25,7 +25,9 @@ const hasUserConsentForProvider = (consent, provider) => {
|
|
|
25
25
|
}
|
|
26
26
|
if (isRecord(consent.categories) &&
|
|
27
27
|
isRecord((_a = consent.consentSettings) === null || _a === void 0 ? void 0 : _a.channels)) {
|
|
28
|
-
allowed = isBool(consent.categories
|
|
28
|
+
allowed = isBool(consent.categories['all'])
|
|
29
|
+
? consent.categories['all']
|
|
30
|
+
: false;
|
|
29
31
|
const category = (_b = Object.entries(consent.consentSettings.channels).find(([, value]) => {
|
|
30
32
|
return value.includes(provider);
|
|
31
33
|
})) === null || _b === void 0 ? void 0 : _b[0];
|
|
@@ -799,7 +801,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
799
801
|
}
|
|
800
802
|
return {
|
|
801
803
|
loaded: isLoaded,
|
|
802
|
-
sdkVersion: "1.
|
|
804
|
+
sdkVersion: "1.44.0" ,
|
|
803
805
|
};
|
|
804
806
|
};
|
|
805
807
|
|
package/index.js
CHANGED
|
@@ -13,8 +13,8 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
13
13
|
var _a, _b;
|
|
14
14
|
let allowed = false;
|
|
15
15
|
if (isRecord(consent === null || consent === void 0 ? void 0 : consent.consent)) {
|
|
16
|
-
allowed = isBool(consent.consent
|
|
17
|
-
if (provider in consent) {
|
|
16
|
+
allowed = isBool(consent.consent['all']) ? consent.consent['all'] : false;
|
|
17
|
+
if (provider in consent.consent) {
|
|
18
18
|
const providerSpecific = consent.consent[provider];
|
|
19
19
|
if (isBool(providerSpecific)) {
|
|
20
20
|
allowed = providerSpecific;
|
|
@@ -26,7 +26,9 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
26
26
|
}
|
|
27
27
|
if (isRecord(consent.categories) &&
|
|
28
28
|
isRecord((_a = consent.consentSettings) === null || _a === void 0 ? void 0 : _a.channels)) {
|
|
29
|
-
allowed = isBool(consent.categories
|
|
29
|
+
allowed = isBool(consent.categories['all'])
|
|
30
|
+
? consent.categories['all']
|
|
31
|
+
: false;
|
|
30
32
|
const category = (_b = Object.entries(consent.consentSettings.channels).find(([, value]) => {
|
|
31
33
|
return value.includes(provider);
|
|
32
34
|
})) === null || _b === void 0 ? void 0 : _b[0];
|
|
@@ -800,7 +802,7 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
|
|
|
800
802
|
}
|
|
801
803
|
return {
|
|
802
804
|
loaded: isLoaded,
|
|
803
|
-
sdkVersion: "1.
|
|
805
|
+
sdkVersion: "1.44.0" ,
|
|
804
806
|
};
|
|
805
807
|
};
|
|
806
808
|
|
package/index.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const hasUserConsentForProvider = (consent, provider) => {
|
|
|
10
10
|
var _a, _b;
|
|
11
11
|
let allowed = false;
|
|
12
12
|
if (isRecord(consent === null || consent === void 0 ? void 0 : consent.consent)) {
|
|
13
|
-
allowed = isBool(consent.consent
|
|
14
|
-
if (provider in consent) {
|
|
13
|
+
allowed = isBool(consent.consent['all']) ? consent.consent['all'] : false;
|
|
14
|
+
if (provider in consent.consent) {
|
|
15
15
|
const providerSpecific = consent.consent[provider];
|
|
16
16
|
if (isBool(providerSpecific)) {
|
|
17
17
|
allowed = providerSpecific;
|
|
@@ -23,7 +23,9 @@ const hasUserConsentForProvider = (consent, provider) => {
|
|
|
23
23
|
}
|
|
24
24
|
if (isRecord(consent.categories) &&
|
|
25
25
|
isRecord((_a = consent.consentSettings) === null || _a === void 0 ? void 0 : _a.channels)) {
|
|
26
|
-
allowed = isBool(consent.categories
|
|
26
|
+
allowed = isBool(consent.categories['all'])
|
|
27
|
+
? consent.categories['all']
|
|
28
|
+
: false;
|
|
27
29
|
const category = (_b = Object.entries(consent.consentSettings.channels).find(([, value]) => {
|
|
28
30
|
return value.includes(provider);
|
|
29
31
|
})) === null || _b === void 0 ? void 0 : _b[0];
|
|
@@ -797,7 +799,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
797
799
|
}
|
|
798
800
|
return {
|
|
799
801
|
loaded: isLoaded,
|
|
800
|
-
sdkVersion: "1.
|
|
802
|
+
sdkVersion: "1.44.0" ,
|
|
801
803
|
};
|
|
802
804
|
};
|
|
803
805
|
|