<head></head>标签中引入下列代码。<script src="https://cdn-go.cn/aegis/aegis-sdk/latest/aegis.min.js"></script>
<script src="https://cdn-go.cn/aegis/aegis-sdk/latest/aegis.min.js?max_age=3600"></script>
const aegis = new Aegis({id: 'pGUVFTCZyewhxxxxxx', // 应用ID,即上报IDuin: 'xxx', // 用户唯一 ID(可选)reportApiSpeed: true, // 接口测速reportAssetSpeed: true, // 静态资源测速spa: true // spa 应用页面跳转的时候开启 pv 计算});
$ npm install --save aegis-web-sdk
import Aegis from 'aegis-web-sdk';const aegis = new Aegis({id: 'pGUVFTCZyewhxxxxxx', // 应用ID,即上报IDuin: 'xxx', // 用户唯一 ID(可选)reportApiSpeed: true, // 接口测速reportAssetSpeed: true, // 静态资源测速spa: true // spa 应用页面跳转的时候开启 pv 计算})
https://aegis.qq.com 作为上报域名,您可以通过 hostUrl 参数来控制上报域名。
国内可以选择选择使用 https://tamaegis.com 作为上报域名。
国外新加坡地区可以选择 https://rumt-sg.com 作为上报域名。文档反馈