v1.0.0
baidu tongji
Configure in .umirc.js,
.umirc.js
export default { plugins: [ ['umi-plugin-tongji', { code: '5a66cxxxxxxxxxx9e13', judge: ()=>true // true or false }], ], }
e.g hm.src = "https://hm.baidu.com/hm.js?5a66c03cxxxxxx554f2b9e13"; code is 5a66c03cxxxxxx554f2b9e13
hm.src = "https://hm.baidu.com/hm.js?5a66c03cxxxxxx554f2b9e13";
5a66c03cxxxxxx554f2b9e13
在JS中调用事件跟踪代码。 window._hmt.push(['_trackEvent', category, action, opt_label, opt_value]);
window._hmt.push(['_trackEvent', category, action, opt_label, opt_value]);
MIT
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
umi-plugin-tongji
baidu tongji
Usage
Configure in
.umirc.js,Code
e.g
hm.src = "https://hm.baidu.com/hm.js?5a66c03cxxxxxx554f2b9e13";code is5a66c03cxxxxxx554f2b9e13事件跟踪
LICENSE
MIT