<head></head> tags on the HTML page:<script src="https://cdn-go.cn/aegis/aegis-sdk/latest/aegis.min.js"></script>
cache-control is set to max-age=666 by default. If you need to modify cache-control, add the max_age parameter. For example:<script src="https://cdn-go.cn/aegis/aegis-sdk/latest/aegis.min.js?max_age=3600"></script>
const aegis = new Aegis({id: 'pGUVFTCZyewhxxxxxx', // Application ID, that is, reported IDuin: 'xxx', // User UIN (optional)reportApiSpeed: true, // API speed testreportAssetSpeed: true, // Static resource speed testspa: true // Enable PV calculation during SPA application page redirect});
aegis-web-sdk in your npm repository:$ npm install --save aegis-web-sdk
import Aegis from 'aegis-web-sdk';const aegis = new Aegis({id: 'pGUVFTCZyewhxxxxxx', // Application ID, that is, reported IDuin: 'xxx', // User UIN (optional)reportApiSpeed: true, // API speed testreportAssetSpeed: true, // Static resource speed testspa: true // Enable PV calculation during SPA application page redirect})
aegis-sdk uses https://aegis.qq.com as the domain name to be reported by default. You can use the hostUrl parameter to configure the domain name to be reported.
For regions in the Chinese mainland, you can choose https://tamaegis.com as the domain name to be reported.
For Singapore region, you can choose https://rumt-sg.com as the domain name to be reported.フィードバック