@doreamonjs/plugin-analysis 1.9.9 → 1.9.12

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.9.12](https://github.com/doreamonjs/doreamon/compare/v1.9.11...v1.9.12) (2023-08-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **plugin-analysis:** umami v2.5.0 use /script.js instead of /umami.js ([07104e6](https://github.com/doreamonjs/doreamon/commit/07104e6f14fd64af0df5122cc74dbb24f5a3c053))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.9.9](https://github.com/doreamonjs/doreamon/compare/v1.9.8...v1.9.9) (2023-08-19)
7
18
 
8
19
  **Note:** Version bump only for package @doreamonjs/plugin-analysis
package/lib/service.js CHANGED
@@ -91,22 +91,21 @@ class Service {
91
91
  (_a = instance === null || instance === void 0 ? void 0 : instance.track) === null || _a === void 0 ? void 0 : _a.call(instance, event, attributes);
92
92
  },
93
93
  },
94
- 'umami': {
94
+ umami: {
95
95
  setup: async (config) => {
96
96
  if (!(config === null || config === void 0 ? void 0 : config.id) || !(config === null || config === void 0 ? void 0 : config.server)) {
97
97
  this.logger.error('umami config server and id are missing');
98
98
  return;
99
99
  }
100
100
  // @TODO attributes need setAttribute(key, value) instead of script[key] = value
101
- // await doreamon.fs.loadJs(`${config.server}/umami.js`, {
101
+ // await doreamon.fs.loadJs(`${config.server}/script.js`, {
102
102
  // defer: true,
103
103
  // 'data-website-id': config.id,
104
104
  // });
105
105
  await new Promise((resolve, reject) => {
106
- var el = document.createElement('script');
106
+ const el = document.createElement('script');
107
107
  el.async = true;
108
- el.defer = true;
109
- el.setAttribute('src', `${config.server}/umami.js`);
108
+ el.setAttribute('src', `${config.server}/script.js`);
110
109
  el.setAttribute('data-website-id', config.id);
111
110
  el.onerror = reject;
112
111
  el.onload = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doreamonjs/plugin-analysis",
3
- "version": "1.9.9",
3
+ "version": "1.9.12",
4
4
  "description": "analysis plugin for doreamonjs",
5
5
  "keywords": [
6
6
  "doreamonjs",
@@ -78,5 +78,5 @@
78
78
  "mixpanel-browser": "^2.45.0",
79
79
  "thinkingdata-browser": "^1.6.0"
80
80
  },
81
- "gitHead": "32ea3f74f51c3c8e67b5cd4181cc9d1212e4d94a"
81
+ "gitHead": "2a21553619c089ec1eff9d02e4b64963f04d70dc"
82
82
  }