README
@qmfe/beacon
加载并初始化灯塔上报组件
- 自适应 HTTP/HTTPS
- 延迟上报,避免影响 onload 时间
npm i -S @qmfe/beacon
import * as beacon from '@qmfe/beacon';
// 初始化
beacon.init(appkey);
// 事件上报
beacon.report(eventID, eventName, { key: value });
加载并初始化灯塔上报组件 - 自适应 HTTP/HTTPS - 延迟上报,避免影响 onload 时间
<script type="module">
import qmfeBeacon from 'https://cdn.skypack.dev/@qmfe/beacon';
</script>
加载并初始化灯塔上报组件
npm i -S @qmfe/beacon
import * as beacon from '@qmfe/beacon';
// 初始化
beacon.init(appkey);
// 事件上报
beacon.report(eventID, eventName, { key: value });