Jaa


Embed the Internet Analyzer client

Important

Azure Internet Analyzer was retired on March 15, 2024. For detailed information, see Azure Internet Analyzer retirement.

This article shows you how to embed the JavaScript client in your application. Installation of this client is necessary to run tests and receive scorecard analytics. The profile-specific JavaScript client is provided after the first test has been configured. From there, you may continue to add or remove tests to that profile without having to embed a new script. For more information on Internet Analyzer, see the overview.

Important

This public preview is provided without a service level agreement and should not be used for production workloads. Certain features may not be supported, may have constrained capabilities, or may not be available in all Azure locations. See the Supplemental Terms of Use for Microsoft Azure Previews for details.

Before you begin

Internet Analyzer requires access to Azure and other Microsoft services to function correctly. Please allow network access to fpc.msedge.net and any preconfigured endpoint URLs (visible through CLI) before embedding the client.

Find the client script URL

The script URL can be found either through the Azure portal or the Azure CLI after a test has been configured. For more information, see Create an Internet Analyzer Resource.

Option 1. In the Azure portal, use this link to open the preview portal page for Azure Internet Analyzer. Navigate to your Internet Analyzer profile to see the script URL by going to Settings > Configuration.

Option 2. Using the Azure CLI, check the scriptFileUri Property.

    az extension add --name internet-analyzer    
    az internet-analyzer test list --resource-group "MyInternetAnalyzerResourceGroup" --profile-name "MyInternetAnalyzerProfile"

Client details

The script is generated specifically for your profile and tests. After being loaded, the script will execute on a 2-second delay. First it contacts the Internet Analyzer service to fetch the list of endpoints configured in your tests. It then runs the measurements and uploads the timed results back to the Internet Analyzer service.

Client examples

These examples show a few basic methods to embed the client JavaScript into your webpage or application. We use 0bfcb32638b44927935b9df86dcfe397 as an example profile ID for the script URL.

Run on page load

The simplest method is to use the script tag inside the meta tag block. This tag will execute the script once per page load.

<html>
<meta>
    <script src="//fpc.msedge.net/client/v2/0bfcb32638b44927935b9df86dcfe397/ab.min.js"></script>
</meta>
<body></body>
</html>

Next steps

Read the Internet Analyzer FAQ