Home›Analytics & data›Add third-party analytics trackers

Add third-party analytics trackers

Add tracking code from Microsoft Clarity, Google Analytics 4, Hotjar or another web analytics tool to every intranet page.

Before you start

  • You need administrator access to Analytics.
  • You need an account with the analytics tool, set up for your intranet's URL.

Overview

Interact Advanced Analytics measures how people use your intranet. A third-party tool adds what it does not cover, such as heatmaps and session recordings, or reporting alongside your other websites.

Tool What it adds
Microsoft Clarity Heatmaps, session recordings and usage insights.
Google Analytics 4 Traffic and engagement reporting alongside your other websites.
Hotjar Heatmaps, session recordings and on-page feedback.

Any tool that installs with a JavaScript snippet works the same way. Interact adds the code you save to your intranet pages, and removing the code turns tracking off.

Step 1: Copy the tracking code from your tool

Each tool gives you a snippet to paste into your site:

  • Microsoft Clarity: create a project for your intranet's URL, then copy the tracking code from the project's Settings > Setup page, using the option to install it manually.
  • Google Analytics 4: create a web data stream for your intranet's URL, then copy the Google tag from its installation instructions.
  • Hotjar: copy the tracking code from your site's settings.

Copy the whole snippet, including the <script> and </script> tags.

Step 2: Add the code to Interact

  1. Go to Analytics > Administration > Third Party Analytics.
  2. Paste the snippet into Third-Party JavaScript Code.
  3. Save your changes.

The code reaches all of your intranet sites within about a minute.

Note: The box holds up to 4,000 characters. To use more than one tool, paste each snippet one after the other. If they do not fit, install a tag manager such as Google Tag Manager here and load the other tools from it.

Step 3: Check the tool is receiving data

Open your intranet in a new browser window and visit a few pages. Then open the tool's live or real-time view. Some tools take a while to show the first data.

If nothing arrives, check the browser's developer console for blocked scripts.

Important: If your intranet sends a Content-Security-Policy header through custom HTTP headers, the browser blocks scripts from domains the policy does not list. Ask Interact Technical Support to add the domains your tool needs, for example *.clarity.ms for Microsoft Clarity. Each tool publishes its list.

Important: Session recordings capture how people use each page. Before you turn them on, review the tool's masking settings and check that your privacy notice covers them.

Section: Analytics & data