cli.gs
Sign in

Tracking pixel

The browser fallback and why it needs confirmation.

The tracking pixel is a 1×1 image on your order confirmation page. When the customer's browser loads it, it reports the order to cli.gs. On this page you'll learn how to add the pixel, which parameters it takes, and why a pixel conversion is parked until your server confirms it. The pixel is quick to add, but it's a fallback, not a replacement for the server postback.

In short:

  • A pixel conversion never moves money by itself. It waits for your server postback or your manual approval.
  • Place the <img> tag on the confirmation page, only when a ref code is stored, with URL-encoded values.
  • Always send the same orderId as in the server postback. That's how the two are matched.
  • There is no test mode for the pixel. Test with the server postback and test: true.

Why the pixel needs confirmation

A pixel is an ordinary URL that anyone can open in a browser, with any amount. If it could book commissions on its own, anyone who knew a ref code could invent sales. So a pixel conversion never moves money by itself. It's recorded and parked under Conversions as To review, with a note that only the browser pixel reported it. It stays there until one of two things happens:

  • your server postback for the same order arrives. It confirms the conversion, and its amount and details replace the pixel's; or
  • you approve it by hand under Conversions.

Pixels are also unreliable by nature. Ad blockers list affiliate pixels, some customers close the page before it loads, and browsers limit what scripts can store. Use the pixel when a server postback isn't possible yet. Or use it alongside the postback so you can see sales in the dashboard straight away.

The snippet

Place this on the order confirmation ("thank you") page and fill in the values from your shop:

html
<!-- Order confirmation page. REF_CODE is the code you stored from ?ref=,
     ORDER_ID and TOTAL come from the order. -->
<img src="https://cli.gs/track/success.png?ref=REF_CODE&orderId=ORDER_ID&basketValue=TOTAL&currency=EUR&customerType=NEW"
     width="1" height="1" alt="" style="position:absolute;left:-9999px" />

Only output the tag when a ref code is stored, and URL-encode every value. The integration page shows the same snippet with your programme's currency filled in, plus a JavaScript variant.

Parameters

ParameterMeaning
refThe stored ref code
orderIdYour order id. Always send it (see below)
basketValueNet subtotal after discount, without tax and shipping, e.g. 149.99
currencyEUR
eventTypeSALE (default), LEAD or SIGNUP
customerTypeNEW or RETURNING
matchKeyProduct or category key for rules with a product key

What the pixel answers

The pixel always answers with a transparent image and HTTP 200, whatever happens. So the page never shows a broken image, and nothing about your programme is revealed. Refused pixel reports that can be traced to your programme, such as an expired click or an unreadable amount, appear under Recent refusals on the integration page.

Test mode isn't available for the pixel. Use the server postback with test: true for testing.

Always send the order id

The pixel conversion and the server postback are matched by orderId and eventType. Without an order id, a pixel report can't be confirmed by your postback. You'd end up with a parked pixel conversion next to the booked one, and approving both would pay twice.

Other things the pixel checks

  • The pixel should be loaded from your own shop's pages. A pixel fired from a domain outside the programme's allowed domains counts as a fraud signal.
  • A single IP address can load the pixel at most 300 times per minute. Beyond that, requests are ignored.
  • Otherwise the same rules as for the postback apply: a valid ref code for this programme, within the cookie window, with a readable amount.

Next steps

To let your shop hear about approvals, rejections and reversals, set up postbacks to your shop.