Pixels 101 - Best Practices

This article covers:

The 4 pixel types supported by CAKE including pros, cons, and implementation tips.

Image Pixel

<img src="http://tracking.domain.com/p.ashx?o=55378899&e=344&f=img&t=TRANSACTION_ID" width="1" height="1" border="0" />

Image pixels are the most basic HTML pixel.

Pros: Easy to implement

Cons: Can only piggyback one other pixel, won’t track if user deletes cookies

Implementation: Can go anywhere on the thank you page


Javascript Pixel

<script type="text/javascript" src="http://tracking.domain.com/p.ashx?o=55378899&e=344&f=js&t=TRANSACTION_ID"></script>

Javascript pixels are snippets of code that build and fire a pixel when the thank you page loads.

Pros: Easy to implement

Cons: Can be blocked (also blocking subsequent piggyback pixels) if there is a Javascript error higher on the page, won’t track if user deletes cookies

Implementation: The higher on the page the better. This lessens the chance that errors from other Javascript will block it.


Iframe Pixel

<iframe src="http://tracking.domain.com/p.ashx?o=55378899&e=344&t=TRANSACTION_ID" height="1" width="1" frameborder="0"></iframe>


Iframe pixels are the most robust HTML pixels.  CAKE recommends Iframe pixels for cookie-based tracking.

Pros: Easy to implement, Javascript on the thank you page won’t interfere, unlimited piggybacking capability (as many as the browser/connection can handle)

Cons: Won’t track if user deletes cookies

Implementation: Anywhere on the thank you page


Postback URL


Postback URLs are calls that are made separate from the web page via a server. Since there is no cookie to read, the postback must include the offer ID and the CAKE reqid, which is passed to the advertiser on the click. The reqid is passed back to CAKE in the r parameter of the CAKE postback.

Pros: Most reliable form of tracking, will still track even if user deletes cookies

Cons: Implementation involves extra steps, including passing the advertiser the reqid and the advertiser passing it back in the postback, not everyone supports postback functionality, all affiliates and their subaffiliates also need to use postback pixels

Implementation: A server separate from the webpage. If postbacks are placed on the web page they will first try to read the cookie and act as a standard HTML pixel.