@doreamonjs/plugin-analysis 1.2.5 → 1.2.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,28 @@
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.2.12](https://github.com/doreamonjs/doreamon/compare/v1.2.11...v1.2.12) (2022-10-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **plugin:** analysis track attributes ([4b84fbf](https://github.com/doreamonjs/doreamon/commit/4b84fbf294fe67aa697d72e9acf670fd0f167904))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.2.11](https://github.com/doreamonjs/doreamon/compare/v1.2.10...v1.2.11) (2022-10-19)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * doreamonjs analysis register ([4e3a510](https://github.com/doreamonjs/doreamon/commit/4e3a5100d053365e8f10cd2ac448fb9014852885))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [1.2.5](https://github.com/doreamonjs/doreamon/compare/v1.2.4...v1.2.5) (2022-10-17)
7
29
 
8
30
  **Note:** Version bump only for package @doreamonjs/plugin-analysis
package/lib/service.js CHANGED
@@ -79,12 +79,12 @@ class Service {
79
79
  this.logger.error('mixpanel config id missing');
80
80
  return;
81
81
  }
82
- const { default: Mixpanel } = await Promise.resolve().then(() => require('mixpanel-browser'));
83
- window.Mixpanel = Mixpanel;
82
+ const mixpanelBrowser = await Promise.resolve().then(() => require('mixpanel-browser'));
83
+ window.Mixpanel = mixpanelBrowser.default || mixpanelBrowser;
84
84
  window.Mixpanel.init(config.id, {
85
85
  debug: config.debug,
86
86
  });
87
- return Mixpanel;
87
+ return window.Mixpanel;
88
88
  },
89
89
  track: (instance, event, attributes) => {
90
90
  var _a;
@@ -126,6 +126,7 @@ class Service {
126
126
  // this.logger.info(`initialize provider: ${client.provider}`);
127
127
  wrapper.instance = await wrapper.setup(client.config);
128
128
  wrapper.isInitialized = true;
129
+ this.logger.info(`[analysis][load] ${client.provider} ...`);
129
130
  }
130
131
  });
131
132
  if (promises) {
@@ -169,7 +170,10 @@ class Service {
169
170
  wrapper.instance,
170
171
  event,
171
172
  {
173
+ ...attributes,
174
+ //
172
175
  user,
176
+ // @depreciated
173
177
  attributes,
174
178
  },
175
179
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doreamonjs/plugin-analysis",
3
- "version": "1.2.5",
3
+ "version": "1.2.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": "f7067606cb2614f2396dfcf378fd2dce8454b0fe"
81
+ "gitHead": "409fec9a3b5b506aca854a0869cb791f6987ac74"
82
82
  }