Skip to main content
The Tracking Pixel is currently in alpha. APIs and behavior may change between releases.
The Immutable Tracking Pixel is a lightweight JavaScript snippet that captures page views, attribution data, and user interactions on your marketing sites, landing pages, and web shops. It feeds this data into Immutable’s events pipeline so you can measure campaign performance and understand where your players come from. No package installation or build step required. Just paste a snippet into your site’s HTML.

What You Need

Install the Snippet

Paste this into your site’s <head> tag:
<script>
(function(){
var w=window,i="__imtbl";
w[i]=w[i]||[];
w[i].push(["init",{"key":"YOUR_PUBLISHABLE_KEY","consent":"anonymous"}]);
var s=document.createElement("script");s.async=1;
s.src="https://cdn.immutable.com/pixel/v1/imtbl.js";
document.head.appendChild(s);
})();
</script>
Replace YOUR_PUBLISHABLE_KEY with your project’s publishable key from Hub.
This snippet sets consent to anonymous, which starts collecting anonymous device signals and page views immediately. If your site requires explicit cookie consent before any tracking, see Consent Modes below.
The script loads asynchronously and does not block page rendering. It’s under 10 KB gzipped.

Verify the Integration

Open your site with the snippet installed, then check the browser developer tools:
  1. Network tab: Look for a request to https://cdn.immutable.com/pixel/v1/imtbl.js (the pixel script loading)
  2. Network tab: Look for POST requests to https://api.immutable.com (events being sent). Events flush every 5 seconds or when 20 events accumulate.
  3. Console: Type window.__imtbl to inspect the command queue
If you see the script loading and POST requests firing, the pixel is working. The consent option controls what the pixel collects. The default is none, meaning the pixel loads but does not collect anything until consent is set.
LevelWhat’s collectedCookies setWhen to use
noneNothing. Pixel loads but is inert.NoneBefore cookie banner interaction
anonymousDevice signals, page views, sessions, form submissions (no PII), outbound clicksimtbl_anon_id, _imtbl_sidAfter basic analytics consent
fullEverything in anonymous + SHA-256 hashed email from form capturesimtbl_anon_id, _imtbl_sidAfter explicit marketing consent
To start with the pixel inert (recommended if you have a cookie consent banner):
<script>
(function(){
var w=window,i="__imtbl";
w[i]=w[i]||[];
w[i].push(["init",{"key":"YOUR_PUBLISHABLE_KEY"}]);
var s=document.createElement("script");s.async=1;
s.src="https://cdn.immutable.com/pixel/v1/imtbl.js";
document.head.appendChild(s);
})();
</script>
Then upgrade consent after the user interacts with your cookie banner:
// After user accepts analytics cookies
window.__imtbl.push(['consent', 'anonymous']);

// Or after user accepts marketing cookies
window.__imtbl.push(['consent', 'full']);

Automatic CMP Detection

If your site uses a Consent Management Platform (such as OneTrust or Cookiebot), the pixel can detect consent state automatically:
<script>
(function(){
var w=window,i="__imtbl";
w[i]=w[i]||[];
w[i].push(["init",{"key":"YOUR_PUBLISHABLE_KEY","consentMode":"auto"}]);
var s=document.createElement("script");s.async=1;
s.src="https://cdn.immutable.com/pixel/v1/imtbl.js";
document.head.appendChild(s);
})();
</script>
When consentMode is set to auto, the pixel starts in none and checks for these standards:
  1. Google Consent Mode v2: reads analytics_storage and ad_storage from window.dataLayer
  2. IAB TCF v2: reads purpose consents via window.__tcfapi
The pixel upgrades consent automatically when the CMP signals it, and continues listening for changes (e.g. when a user updates their cookie preferences).
consentMode and consent are mutually exclusive. Do not set both.
You can downgrade consent at any time. Downgrading to none purges any PII from the local event queue:
window.__imtbl.push(['consent', 'none']);

What the Pixel Tracks Automatically

Once consent is set to anonymous or higher, the pixel captures these events with no additional code:
EventWhen it firesWhat it captures
Page viewEvery page loadUTM parameters, click IDs (gclid, fbclid, ttclid, msclkid, dclid, li_fat_id), referrer, landing page, referral codes
Session startNew session beginsSession ID
Session endPage unloadSession ID, duration in seconds
Form submissionHTML form submitForm action, ID, name, field names. At full consent: SHA-256 hashed email.
Outbound link clickClick on external linkDestination URL, link text, element ID
You can disable specific auto-capture behaviors. See the Configuration reference for details.

Cross-Subdomain Tracking

To track users across subdomains (e.g. www.example.com and shop.example.com), set the domain option:
window.__imtbl.push(["init",{"key":"YOUR_KEY","consent":"anonymous","domain":".example.com"}]);

Content Security Policy (CSP)

If your site uses a Content-Security-Policy header, you’ll need to allow cdn.immutable.com (script) and api.immutable.com (events). See the Configuration reference for the full directives and nonce-based CSP setup.

FAQ

The pixel uses first-party cookies and standard fetch() requests, which minimizes interference from ad blockers. First-party domain hosting further reduces this risk.
The pixel fires a page view on initial load only. For SPA route changes, use the Web SDK’s page() method (coming soon). SPA support is planned for a future pixel release.
Under 10 KB gzipped. The script loads asynchronously and does not block page rendering.
Chrome 80+, Firefox 78+, Safari 14+, Edge 80+.
Use consentMode: 'auto' for automatic detection. Or manually call window.__imtbl.push(['consent', 'full']) from your CMP’s callback.

Next Steps

Data Dictionary

What the pixel collects at each consent level

Configuration Reference

All init options and command queue methods

Attribution

Learn how pixel data powers player attribution

API Keys

Manage your publishable and secret keys