@blotoutio/providers-google-analytics-4-sdk 0.10.2 → 0.10.3

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.
Files changed (2) hide show
  1. package/index.js +6 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -19,9 +19,7 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
19
19
  }
20
20
  };
21
21
  const init = ({ manifest, userId }) => {
22
- if (!window ||
23
- !manifest.variables ||
24
- manifest.variables['type'] === 'DYNAMIC') {
22
+ if (!window || !manifest.variables) {
25
23
  return;
26
24
  }
27
25
  if (!window.gtag) {
@@ -169,13 +167,14 @@ var ProvidersGoogleAnalytics4Sdk = (function () {
169
167
  }
170
168
  };
171
169
 
172
- const tag = ({ data, eventName, manifestVariables }) => {
173
- if (manifestVariables['type'] === 'FULL') {
170
+ const tag = ({ data, eventName }) => {
171
+ const isLoaded = window && window.gtag && !!getCookieValue('_ga');
172
+ if (isLoaded) {
174
173
  handleTag({ data, eventName });
175
174
  }
176
175
  return {
177
- loaded: !!getCookieValue('_ga'),
178
- sdkVersion: "0.10.2" ,
176
+ loaded: isLoaded,
177
+ sdkVersion: "0.10.3" ,
179
178
  };
180
179
  };
181
180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-google-analytics-4-sdk",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "Google Analytics 4 Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",