costway-tracking-v2 2.0.0 → 2.0.2

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 (3) hide show
  1. package/README.md +7 -7
  2. package/index.cjs +3 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -6,10 +6,10 @@
6
6
 
7
7
  ```bash
8
8
  # 使用npm
9
- npm install costway-tracking
9
+ npm install costway-tracking-v2
10
10
 
11
11
  # 使用yarn
12
- yarn add costway-tracking
12
+ yarn add costway-tracking-v2
13
13
  ```
14
14
 
15
15
  ## 框架集成指南
@@ -20,7 +20,7 @@ yarn add costway-tracking
20
20
 
21
21
  ```javascript
22
22
  import Vue from 'vue';
23
- import { initTracking, setConfig } from 'costway-tracking/index.cjs'
23
+ import { initTracking, setConfig } from 'costway-tracking-v2/index.cjs'
24
24
 
25
25
  export default ({ app }) => {
26
26
  // 使用 app.router 访问路由实例
@@ -42,7 +42,7 @@ plugins: [
42
42
  在`main.js`中添加:
43
43
 
44
44
  ```javascript
45
- import { initTracking, setConfig } from 'costway-tracking/trackvue3'
45
+ import { initTracking, setConfig } from 'costway-tracking-v2/trackvue3'
46
46
 
47
47
  setConfig({ country: 'us' })
48
48
  initTracking(router);
@@ -52,8 +52,8 @@ initTracking(router);
52
52
 
53
53
  为兼容Vue2和Vue3,我们提供了不同的导入文件:
54
54
 
55
- - Vue2: `costway-tracking/index.cjs`
56
- - Vue3: `costway-tracking/trackvue3`
55
+ - Vue2: `costway-tracking-v2/index.cjs`
56
+ - Vue3: `costway-tracking-v2/trackvue3`
57
57
 
58
58
  ## CDN方式集成 (M2相关国家)
59
59
 
@@ -197,7 +197,7 @@ npm publish --tag beta
197
197
  如需撤销最近24小时内发布的版本:
198
198
 
199
199
  ```bash
200
- npm unpublish costway-tracking@版本号
200
+ npm unpublish costway-tracking-v2@版本号
201
201
  ```
202
202
 
203
203
  ### 完整发布流程示例
package/index.cjs CHANGED
@@ -484,6 +484,9 @@ module.exports = {
484
484
  },
485
485
  setConfig: function (globalConfig) {
486
486
  config = Object.assign(config, globalConfig);
487
+ },
488
+ getSession: function () {
489
+ return getSession();
487
490
  }
488
491
  }
489
492
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "costway-tracking-v2",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "统计代码,新增vue3和vue2分别管理版本-增加多国家",
5
5
  "main": "index.cjs",
6
6
  "type": "module",