IMQA GUIDE
HomepageFAQDeveloper forum
ENG
ENG
  • Getting started
    • Notice
    • Supported environment
  • Installation Guide
    • Android
      • Installing MPM SDK
      • Setting MPM SDK
      • Installing Crash SDK
      • Setting Crash SDK
    • iOS
      • Installing MPM SDK
      • Setting MPM SDK
      • Installing Crash SDK
      • Setting Crash SDK
    • React Native
      • Android
      • iOS
      • React Native Library
    • Cordova
      • Android
      • iOS
    • Morpheus
      • Android
      • iOS
    • W Hybrid
    • Web (WPM)
      • WebAgent Installation
      • WebAgent Setting
      • Browser Compatibility
  • User Guide
    • Using MPM
      • Project list
      • Performance Dashboard
      • A/B Dashboard
      • Screen performance analysis
      • Detailed performance analysis
      • UBA (User Behavior Analysis)
      • Region analysis
      • Statistics
      • Report
      • Alert
      • Management
    • Using Crash
      • Project list
      • Dashboard
      • Error details
      • Error search
      • Statistics
      • Settings
    • Using WPM
      • Project list
      • Performance Dashboard
      • Page performance analysis
      • Detailed performance analysis
      • Reverse Behavior Analysis
      • Statistics
      • Report
      • Alert
      • Management
    • Using WCrash
      • Project list
      • Dashboard
      • Error details
      • Error search
      • Statistics
Powered by GitBook
On this page
  • 1. WPM Alone (WebAgent Installation)
  • 2. Both WPM/MPM (WebAgent + WebViewAgent Installation)
  1. Installation Guide
  2. Web (WPM)

WebAgent Installation

Last updated 1 year ago

This document provides instructions for applying IMQA WebAgent in different browser environments.

You can install IMQA WebAgent in two ways: you can connect to the CDN server, or if you use the install wizard or do not have access to CDN, you can download the corresponding script. Right-click the link below and select “Save As”:

1. WPM Alone (WebAgent Installation)

This is how to install the Agent for web performance analytics in a web browser application configuration using only the WPM service.

Fetching from a CDN server

IMQA WebAgent requires inserting the script into the top of your html in the <head>.

html <head> to connect to web-agent.js
// IMQA web-agent.js connection
<script src="https://cdn.imqa.io/agent/web-agent-1.1.11.js"></script>

// IMQA web-agent Required script values
<script>
((w, c, _wv, _w, _wk, _mh, _b) => {
    w[c] = w[c] || {};
    function imqaConf(key, value){w[c][key]=value};

    imqaConf("imqaAgentUse", true);
    imqaConf("projectKey", "User project key");

    w[_w](w);
})(window, 'imqaClientConfig', 'IMQAWebviewMain', 'IMQAWebMain', 'webkit', 'messageHandlers', 'ImqaBridge')
</script>

Install locally

html <head> to connect to web-agent.js
// Connect IMQA web-agent.js 
<script src="user path/web-agent-1.1.11.js"></script>

// IMQA web-agent Required script values
<script>
((w, c, _wv, _w, _wk, _mh, _b) => {
    w[c] = w[c] || {};
    function imqaConf(key, value){w[c][key]=value};

    imqaConf("imqaAgentUse", true);
    imqaConf("projectKey", "User project key");

    w[_w](w);
})(window, 'imqaClientConfig', 'IMQAWebviewMain', 'IMQAWebMain', 'webkit', 'messageHandlers', 'ImqaBridge')
</script>

2. Both WPM/MPM (WebAgent + WebViewAgent Installation)

This is how to install the Agent for WebView/web performance analytics in mobile and web browser application configurations using both WPM and MPM services.

Fetching from a CDN server

IMQA WebAgent requires inserting the script into the top of your html in the <head>.

html <head> to connect to web-agent.js
// Connect IMQA web-agent.js
<script src="https://cdn.imqa.io/agent/web-agent-1.1.11.js"></script>
<script src="https://cdn.imqa.io/agent/webview-agent-1.1.3.js"></script>

// IMQA web-agent Required script values
<script>
((w, c, _wv, _w, _wk, _mh, _b) => {
    w[c] = w[c] || {};
    function imqaConf(key, value){w[c][key]=value};

    imqaConf("imqaAgentUse", true);
    imqaConf("projectKey", "User project key");
    if ((w[_wk] !== undefined && w[_wk][_mh] !== undefined) || w[_b] !== undefined)
      w[_wv](w);
    else w[_w](w);
})(window, 'imqaClientConfig', 'IMQAWebviewMain', 'IMQAWebMain', 'webkit', 'messageHandlers', 'ImqaBridge')
</script>

Install locally

html <head> to connect to web-agent.js
// Connect IMQA web-agent.js received locally
<script src="user path/web-agent-1.1.11.js"></script>
<script src="user path/webview-agent-1.1.3.js"></script>

// IMQA web-agent Required script values
<script>
((w, c, _wv, _w, _wk, _mh, _b) => {
    w[c] = w[c] || {};
    function imqaConf(key, value){w[c][key]=value};

    imqaConf("imqaAgentUse", true);
    imqaConf("projectKey", "User project key");
    if ((w[_wk] !== undefined && w[_wk][_mh] !== undefined) || w[_b] !== undefined)
      w[_wv](w);
    else w[_w](w);
})(window, 'imqaClientConfig', 'IMQAWebviewMain', 'IMQAWebMain', 'webkit', 'messageHandlers', 'ImqaBridge')
</script>

If you use install wizard or you do not have access to CDN, you can download the corresponding script. Right-click below and select “Save As”:

https://imqawebviewagent.blob.core.windows.net/agent/web-agent.js
this link