> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thrad.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Image pixel fallback

> Use a first-party 1x1 image request when JavaScript cannot run.

The JavaScript Tag is the recommended install path. It captures attribution, sends automatic page events, supports custom events and conversions, and retries in the browser when possible.

Use the image pixel only as a fallback for surfaces where JavaScript cannot run, such as `<noscript>` blocks, restricted CMS templates, email-like renderers, or environments that block the Tag script. The image pixel writes into the same attribution event pipeline as the JavaScript Tag.

## Endpoint

```http theme={null}
GET https://events.thrad.ai/v1/e
```

The endpoint returns a transparent 1x1 GIF. It does not redirect and always uses no-cache headers:

| Header | Value |
| - | - |
| `Content-Type` | `image/gif` |
| `Cache-Control` | `no-store, max-age=0` |
| `Pragma` | `no-cache` |
| `X-Content-Type-Options` | `nosniff` |

## Basic snippet

Place this next to your normal Tag install if you need a no-JavaScript fallback:

```html theme={null}
<noscript>
  <img
    src="https://events.thrad.ai/v1/e?tag_id=<YOUR_TAG_ID>&amp;event=page_viewed"
    width="1"
    height="1"
    alt=""
    style="display:none"
  />
</noscript>
```

Replace `<YOUR_TAG_ID>` with the tag ID Thrad sent you.

The query key must remain `tag_id`: use `?tag_id=adv_example`, never
`?adv_example=...`. Put an `&` between query parameters in a URL; use `&amp;`
only when that URL is written inside HTML. Percent-encode each dynamic value
once, including attribution references containing `+`, `%`, `&` or `=`.

## Parameters

| Parameter | Required | Notes |
| - | - | - |
| `tag_id` | yes | Your Thrad tag ID. |
| `event` | yes | Event name, for example `page_viewed`, `contents_viewed`, `items_added`, `checkout_started`, `order_created`, or `lead_created`. |
| `event_id` | no | Stable event ID for deduplication. If omitted, Thrad generates one. |
| `oppref` | no | OpenAI click reference when one is available on the landing URL. The JavaScript Tag captures this automatically; an image-only install must include it explicitly if you want OpenAI-attributed delivery. |
| `data[...]` | no | Optional event properties. Supported fields are listed below. |

Unknown query keys are rejected. Google Tag Manager's default `gtmcb` is
transport metadata in the cache-buster-compatible collector; it is not event
data and does not replace `event_id`. For an existing installation reporting
`gtmcb` rejection, temporarily disable **Enable Cache Busting** until Thrad
confirms the compatible collector is live. After confirmation, keep the default
`gtmcb` name; arbitrary cache-buster names are not supported.

## Google Tag Manager Custom Image

Prefer the [JavaScript GTM installation](https://docs.thrad.ai/advertisers/attribution/tag/guides/google-tag-manager.md)
when scripts can run. If you need a Custom Image tag, put the URL itself in
**Image URL**, without an `<img>` wrapper or HTML `&amp;` separators:

```text theme={null}
https://events.thrad.ai/v1/e?tag_id=adv_example&event=page_viewed&event_id=page-123&oppref=example%2Breference%26value%3D1%25
```

Replace the example tag, event identity and reference with real values. Generate
a new identity for each logical page event and retain it for retries of that
event. Do not use a fixed `page-123` for all visits. An image-only install must
carry the attribution reference captured on arrival; it does not automatically
read the Tag's cookie or recover a missing reference on a later page.

Use structured URL construction for dynamic values:

```javascript theme={null}
function imageEventUrl(tagId, eventName, eventId, data, oppref) {
  const url = new URL("https://events.thrad.ai/v1/e");
  url.searchParams.set("tag_id", tagId);
  url.searchParams.set("event", eventName);
  url.searchParams.set("event_id", eventId);
  if (oppref) url.searchParams.set("oppref", oppref);
  Object.entries(data).forEach(([key, value]) => {
    url.searchParams.set("data[" + key + "]",
      key === "contents" ? JSON.stringify(value) : String(value));
  });
  return url.toString();
}
```

Supply only supported event/data fields below; this function encodes values,
not permissions to send arbitrary data. Pass raw values to `searchParams.set`,
not values already processed by `encodeURIComponent`. Use the returned URL
as the Custom Image tag's **Image URL**. Preview the request before publishing.
[Google's Custom Image setup](https://support.google.com/tagmanager/answer/6107167)

## Event data

Add event properties with bracketed `data[...]` query parameters:

```html theme={null}
<img
  src="https://events.thrad.ai/v1/e?tag_id=<YOUR_TAG_ID>&amp;event=items_added&amp;event_id=cart-123&amp;data[content_id]=sku_123&amp;data[quantity]=2&amp;data[value]=58.00&amp;data[currency]=USD"
  width="1"
  height="1"
  alt=""
  style="display:none"
/>
```

Supported `data[...]` fields:

| Field | Notes |
| - | - |
| `content_id` | Product, article, plan, or content identifier. |
| `content_name` | Human-readable content name. |
| `content_type` | Content type, for example `product`, `article`, or `plan`. |
| `contents` | JSON array of content objects. Each object can include `content_id`, `content_name`, `content_type`, `quantity`, and `value`. |
| `currency` | 3-letter ISO currency code, for example `USD`. |
| `order_id` | Stable merchant order identifier for purchase reconciliation. |
| `quantity` | Item count. |
| `value` | Monetary value. |

Only include data needed for attribution and reporting. Do not include email addresses, phone numbers, names, raw addresses, unrestricted customer IDs, session tokens, auth tokens, or other sensitive values in the URL.

## Conversions

For purchase completion, send `order_created` with both a stable `event_id` and
the real `data[order_id]`, value and currency:

```html theme={null}
<img
  src="https://events.thrad.ai/v1/e?tag_id=<YOUR_TAG_ID>&amp;event=order_created&amp;event_id=order_123&amp;data[order_id]=order_123&amp;data[value]=99.99&amp;data[currency]=USD"
  width="1"
  height="1"
  alt=""
  style="display:none"
/>
```

Fire this only for a completed order. Reuse the same event and order identities
on retries and reloads. If `event_id` is omitted, a fresh one is generated for
each request; `data[order_id]` alone is not a guarantee that raw image events
deduplicate. Browser/server purchase integrations must agree on their supported
tag/order identity; do not replace the canonical purchase flow with an image
request when an acknowledged purchase receipt is required.

## Verify acceptance

A GIF response, HTTP 200 or GTM's “tag fired” result does not prove ingestion.
Invalid requests also return a GIF. Check Thrad's stored event and diagnostic
reason for the exact tag/event identity; confirm the intended event, reference,
order data and replay behavior. Provider acknowledgment and conversion credit
are separate checks. Missing tag IDs, unsupported fields, disabled configuration
and oversized requests still cause diagnosed drops.

## When to use the JavaScript Tag instead

Prefer the [JavaScript Tag](https://docs.thrad.ai/advertisers/attribution/tag/install.md) whenever the page can run scripts. The JavaScript Tag automatically captures click parameters, stores attribution across pages, sends richer browser context, and handles Shopify checkout patterns with the dedicated [Shopify guide](https://docs.thrad.ai/advertisers/attribution/tag/guides/shopify.md).

Use the image pixel when you need a simple request that can be rendered by a browser without JavaScript.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.