README
wpa-monitor
WPA Monitoring System SDK
English | 简体中文
Import the script:
(function() {
var wpa = document.createElement("script");
wpa.onload = function () {
if(window.WPAMonitor) {
window.wpa = new window.WPAMonitor({
appName: 'survey',
reportUrl: 'https://in.weisurvey.com/wpa/collect',
eventUrl: 'https://in.weisurvey.com/wpa/event',
})
}
};
wpa.src = "https://mur-survey-1255655535.file.myqcloud.com/static_files/js/wpa-monitor.iife.js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(wpa, s);
})();
Using npm:
Installation
npm i wpa-monitor -D
Use library
import WPAMonitor from 'wpa-monitor'
const wpa = new WPAMonitor({
appName: 'survey',
reportUrl: 'https://in.weisurvey.com/wpa/collect',
eventUrl: 'https://in.weisurvey.com/wpa/event',
})
Default Options:
const options = {
appName: '', // required
reportUrl: '', // required
eventUrl: '',
uid: '',
cid: '',
tag: '',
analyticsTracker: null,
logPrefix: '[WPA]: ',
logging: true,
}