Skip to content

Tracking Pixel

No-JS fallback for environments that can't run a <script> at all: email clients, pages under a restrictive Content-Security-Policy, or no-code builders whose custom-code fields only accept HTML, not JS. There's no client-side code to install — the whole mechanism is a single <img> tag.

Get your Site ID

From the dashboard: Integration Hub → Add New App → Web. Register the pixel-serving domain the same way you would for the JavaScript SDK — the backend verifies the request's Referer header against it, since a pixel can't send custom headers.

Paste the tag

<img src="https://api.mitranalytics.dev/api/v1/p.gif?sid=YOUR_SITE_ID&p=/newsletter&t=email_open"
     width="1" height="1" alt="" style="display:none" />

Query parameters

ParamRequiredMeaning
sidYesSite ID
pNoPath (defaults to /)
tNoEvent type (defaults to pageview)
uidNoPre-hashed user id, if you're hashing identity server-side yourself
utm_*Noutm_source, utm_campaign, etc.
meta_*NoCustom event properties, e.g. meta_subject_line=welcome

Generating the URL from a script

If you're generating pixel tags from an email-template pipeline or static-site generator, use the optional URL-builder helper instead of hand-encoding query params:

import { buildPixelImgTag } from '@mitr/pixel';

const tag = buildPixelImgTag({
  siteId: 'YOUR_SITE_ID',
  eventType: 'email_open',
  utm: { source: 'newsletter', campaign: 'march_launch' },
});

What you don't get, on purpose

A pixel can't run JS, so it can't do anything the SDKs do beyond firing one event per load:

  • No batching or retry — one request, once, whenever the <img> loads.
  • No identify()/reset() session state — pass uid explicitly per-URL if you already have a hashed identity to attach.
  • No response visibility — the endpoint always returns a valid 1x1 GIF with HTTP 200, even when the underlying event was rejected. A broken image would be the one thing that visibly leaks "tracking failed" to whoever's looking at the email/page, so failures are silent by design — check the dashboard to confirm events are arriving, not the pixel response itself.

Have questions about integration or security? Drop us a line directly.