1.1.7 • Published 12 months ago

if-fe-stats v1.1.7

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

npm依赖使用

npm i if-fe-stats

import IfFeStats from 'if-fe-stats/dist/h5/if-stats-h5.js'

const ifStats = IfFeStats.default;
ifStats.initSafe({axios, fetchUrl: '请求安全链路的接口'}).then(sClientId => {
  ifStats.init({
    server_url: process.env.VUE_APP_FE_STATS,
    show_log: process.env.NODE_ENV === 'production' ? false : true,
    is_track_single_page: true // 单页面配置,默认开启,若页面中有锚点设计,需要将该配置删除,否则触发锚点会多触发 $pageview 事件
  });

  ifStats.use('PageLeave');
  // 全局注入的参数,在localStorage中,如果存在则覆盖
  ifStats.clearDynamicChangeCommonData();
  ifStats.dynamicChangeCommonData({
    p_id: '', // 应用唯一ID(由大数据分配)
    u_id: '', // UCID(用户唯一标识)
    e_i: '', // 事件(点位)ID
    u_type: 'uniId', // uniId、gw、userCode
    s_r: '',
    s_clientId: sClientId,
    os: '',
    os_v: '',
    lang: '',
    d_n: '',
    b_k: '',
    lon: '',
    lat: '',
    n_t: '',
    app_v: '',
    spm: ''
  });
  ifStats.quick('autoTrack');
})

script直接引入

// cdn地址请联系相关人员
<script src="./ifumdStatsH5.js"></script>

<script>
const ifStats = ifumdStatsH5.default

ifStats.init({
  server_url: 'http://127.0.0.1:9555/nlogtj/h5',
  show_log: true,
  is_track_single_page:true // 单页面配置,默认开启,若页面中有锚点设计,需要将该配置删除,否则触发锚点会多触发 $pageview 事件
});

ifStats.initSafe({fetch, fetchUrl: '请求安全链路的接口'}).then(sClientId => {
  ifStats.init({
    server_url: process.env.VUE_APP_FE_STATS,
    show_log: process.env.NODE_ENV === 'production' ? false : true,
    is_track_single_page: true // 单页面配置,默认开启,若页面中有锚点设计,需要将该配置删除,否则触发锚点会多触发 $pageview 事件
  });

  ifStats.use('PageLeave');
  // 全局注入的参数,在localStorage中,如果存在则覆盖
  ifStats.clearDynamicChangeCommonData();
  ifStats.dynamicChangeCommonData({
    p_id: '', // 应用唯一ID(由大数据分配)
    u_id: '', // UCID(用户唯一标识)
    e_i: '', // 事件(点位)ID
    u_type: 'uniId', // uniId、gw、userCode
    s_r: '',
    s_clientId: sClientId,
    os: '',
    os_v: '',
    lang: '',
    d_n: '',
    b_k: '',
    lon: '',
    lat: '',
    n_t: '',
    app_v: '',
    spm: ''
  });
  ifStats.quick('autoTrack');
})
</script>  
1.1.7

12 months ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago