mytart 0.2.2 → 0.2.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.
- package/dist/index.js +4 -6
- package/dist/index.mjs +4 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -104,18 +104,16 @@ var GoogleAnalyticsProvider = class extends BaseProvider {
|
|
|
104
104
|
}
|
|
105
105
|
injectGtagScript() {
|
|
106
106
|
return new Promise((resolve) => {
|
|
107
|
-
const script = document.createElement("script");
|
|
108
|
-
script.async = true;
|
|
109
|
-
script.src = `${GTAG_URL}?id=${this.config.measurementId}`;
|
|
110
107
|
window.dataLayer = window.dataLayer || [];
|
|
111
108
|
window.gtag = window.gtag || function gtag(...args) {
|
|
112
109
|
window.dataLayer.push(args);
|
|
113
110
|
};
|
|
111
|
+
const script = document.createElement("script");
|
|
112
|
+
script.async = true;
|
|
113
|
+
script.src = `${GTAG_URL}?id=${this.config.measurementId}`;
|
|
114
114
|
script.onload = () => {
|
|
115
115
|
window.gtag("js", /* @__PURE__ */ new Date());
|
|
116
|
-
window.gtag("config", this.config.measurementId
|
|
117
|
-
send_page_view: false
|
|
118
|
-
});
|
|
116
|
+
window.gtag("config", this.config.measurementId);
|
|
119
117
|
resolve();
|
|
120
118
|
};
|
|
121
119
|
script.onerror = () => resolve();
|
package/dist/index.mjs
CHANGED
|
@@ -61,18 +61,16 @@ var GoogleAnalyticsProvider = class extends BaseProvider {
|
|
|
61
61
|
}
|
|
62
62
|
injectGtagScript() {
|
|
63
63
|
return new Promise((resolve) => {
|
|
64
|
-
const script = document.createElement("script");
|
|
65
|
-
script.async = true;
|
|
66
|
-
script.src = `${GTAG_URL}?id=${this.config.measurementId}`;
|
|
67
64
|
window.dataLayer = window.dataLayer || [];
|
|
68
65
|
window.gtag = window.gtag || function gtag(...args) {
|
|
69
66
|
window.dataLayer.push(args);
|
|
70
67
|
};
|
|
68
|
+
const script = document.createElement("script");
|
|
69
|
+
script.async = true;
|
|
70
|
+
script.src = `${GTAG_URL}?id=${this.config.measurementId}`;
|
|
71
71
|
script.onload = () => {
|
|
72
72
|
window.gtag("js", /* @__PURE__ */ new Date());
|
|
73
|
-
window.gtag("config", this.config.measurementId
|
|
74
|
-
send_page_view: false
|
|
75
|
-
});
|
|
73
|
+
window.gtag("config", this.config.measurementId);
|
|
76
74
|
resolve();
|
|
77
75
|
};
|
|
78
76
|
script.onerror = () => resolve();
|