Skip to main content

Overview

The simplest way to add InfiniteWatch to your website — just drop in a script tag. No build tools, no npm install, no configuration files.

Installation

Add the following script tag at the end of your HTML <head> section, before the closing </head> tag:
<script async
  src="https://unpkg.com/@infinitewatch/web-core@^1/dist/watch.js"
  data-iw-organization-id="YOUR_ORGANIZATION_ID">
</script>
Replace YOUR_ORGANIZATION_ID with your actual organization ID. You can find this in your InfiniteWatch dashboard.
That’s it — the script loads asynchronously and starts recording sessions automatically.

Using Google Tag Manager

If you prefer to load InfiniteWatch via Google Tag Manager, use this snippet instead:
<script>
  window.__IW_CONFIG__ = {
    organizationId: "YOUR_ORGANIZATION_ID"
  };
</script>

<script async src="https://unpkg.com/@infinitewatch/web-core@^1/dist/watch.js"></script>

Identify Users

After the tracker is initialized, you can associate sessions with specific users using the identify() method:
InfiniteWatch.identify({
  external_id: 'user-12345'
});
With additional user information:
InfiniteWatch.identify({
  external_id: 'user-12345',
  email: 'user@example.com',
  full_name: 'John Doe',
  metadata: {
    plan: 'premium',
    signup_date: '2024-01-15'
  }
});
Call identify() after the user logs in. The external_id is persisted in a cookie so it carries across page reloads and sessions.

How It Works

Once the script is added, InfiniteWatch will automatically:
  • Record user sessions and interactions
  • Capture DOM events, mouse movements, and clicks
  • Generate web insights data
  • Send data to your InfiniteWatch dashboard
The script loads asynchronously, so it won’t block your page load.