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