IngestionTracking Pixel

Tracking Pixel

The Tracking Pixel endpoint serves a 1x1 transparent GIF image that records an event when loaded. This is designed for environments where JavaScript execution is not possible, such as email clients and HTML-only contexts.

Endpoint

GET /v1/pixel/{type}

Where {type} is the event type: track, page, identify, or group.

Authentication

The pipeline key is passed as a query parameter:

?wk=dk_live_abc123...

How It Works

  1. A client (browser, email client, etc.) requests the pixel URL
  2. The Ingestion Gateway parses the query parameters into an event payload
  3. The event is published to the Kafka raw-events topic
  4. The gateway returns a 1x1 transparent GIF with appropriate cache-busting headers
<img> request → Ingestion Gateway → Kafka → 1x1 GIF response

The response includes:

HeaderValue
Content-Typeimage/gif
Cache-Controlno-store, no-cache, must-revalidate
Pragmano-cache
Expires0

Query Parameters

Event data is encoded as query parameters:

ParameterDescriptionExample
wkPipeline key (required)dk_live_abc123...
eEvent name (for track events)Email+Opened
uidUser IDuser_98765
aidAnonymous IDanon_abc123
p.*Event properties (dot notation)p.campaign_id=camp_001
t.*User/group traitst.email=jane@example.com
tsEvent timestamp (Unix milliseconds)1740493800000
midMessage ID for deduplicationa1b2c3d4
cbCache buster (ignored, prevents caching){random}

Examples

Email Open Tracking

Track when a recipient opens an email:

<img
  src="https://data.example.com/v1/pixel/track?wk=dk_live_abc123&e=Email+Opened&uid=user_98765&p.campaign_id=camp_001&p.email_subject=February+Newsletter&cb=1740493800"
  width="1"
  height="1"
  alt=""
  style="display:none"
/>

This records a track event named Email Opened with properties campaign_id and email_subject, tied to user_98765.

Page View in AMP

Track a page view in an AMP page where custom JavaScript is restricted:

<amp-pixel
  src="https://data.example.com/v1/pixel/page?wk=dk_live_abc123&p.url=CANONICAL_URL&p.title=TITLE&cb=RANDOM"
  layout="nodisplay"
></amp-pixel>

Simple Conversion Tracking

Track a conversion in an environment where you can only embed an image:

<img
  src="https://data.example.com/v1/pixel/track?wk=dk_live_abc123&e=Purchase&uid=user_98765&p.order_id=ORD-001&p.revenue=99.99&p.currency=USD&cb=1740493800"
  width="1"
  height="1"
  alt=""
  style="display:none"
/>

Always include a cb (cache buster) parameter with a random or timestamp value. This prevents email clients and browsers from caching the pixel and skipping subsequent requests.

Dynamic Pixel URLs

You can generate pixel URLs server-side to include user-specific data:

function buildPixelUrl(pipelineKey, event, userId, properties) {
  const base = "https://data.example.com/v1/pixel/track";
  const params = new URLSearchParams({
    wk: pipelineKey,
    e: event,
    uid: userId,
    cb: Date.now().toString(),
  });
 
  for (const [key, value] of Object.entries(properties)) {
    params.set(`p.${key}`, String(value));
  }
 
  return `${base}?${params.toString()}`;
}
 
const url = buildPixelUrl("dk_live_abc123", "Email Opened", "user_98765", {
  campaign_id: "camp_001",
  email_subject: "February Newsletter",
});
// https://data.example.com/v1/pixel/track?wk=dk_live_abc123&e=Email+Opened&uid=user_98765&cb=1740493800000&p.campaign_id=camp_001&p.email_subject=February+Newsletter

Limitations

LimitationDetail
GET onlyPixel requests use GET, so event data is encoded in the URL
URL lengthMost clients support up to ~2,000 characters; keep payloads small
No response dataThe response is always a GIF; errors are logged server-side
No cookiesEmail clients typically strip cookies; anonymous identity is not available
CachingSome email clients pre-fetch or cache images; use the cb parameter
⚠️

Email open tracking is approximate. Some clients block remote images entirely, while others pre-load them regardless of whether the recipient reads the email. Use pixel data as a directional signal, not an exact metric.

Best Practices

  • Always URL-encode parameter values. Spaces should be + or %20, special characters should be percent-encoded.
  • Keep URLs under 2,000 characters. Send only essential properties via the pixel; enrich the event in the processing layer if needed.
  • Use userId rather than anonymousId for pixel events since cookies are typically not available.
  • Include a messageId if you embed the same pixel in multiple locations and want to deduplicate.