yach.open.track
v0.0.3
Published
非知音楼环境打开的应用使用时长统计 jssdk
Downloads
4
Readme
yach.open.track
非知音楼环境打开的应用使用时长统计 jssdk
安装
yarn add yach.open.track
使用
浏览器使用
<!-- 引入 -->
<script src="node_modules/yach.open.track/lib/track.browser.js"></script>
<!-- 使用 -->
window.track.init(options);
npm 使用
// 引入
import track from "yach.open.track";
// 使用
track.init(options);
options
| 参数 | 必填 | 类型 | 备注 | | ------- | ---- | ------------------------------ | ------- | | appId | 是 | String | 应用 id | | workCode | 是 | String | 用户工号 | | env | 否 | String | 日志上报环境,online-生产环境、test-测试环境,默认值 online | | showLog | 否 | Boolean | 打开日志输出功能,默认值 false |
示例
import track from "yach.open.track";
track.init({
appId: 'xxxx',
workCode: 'xxxx',
env: 'online',
showLog: false
});