Skip to main content
Pixel code (c2s)
Natalya Yefimenko avatar
Written by Natalya Yefimenko
Updated over 11 months ago

JavaScript pixel code is a way to receive information about conversions if you don't have a side server or dedicated development team, and your product is sold on the website. Also, platforms like Shopify do not support native postback. In this case, pixel integration may be the only option.

JS pixel is a part of client-to-server (C2S) integration. With the help of a pixel code you can see conversions in statistics on Reach, as well as different types of data: amount of earned money, amount of money paid to a publisher, an event (a target action), etc.

To receive information via a pixel code, you need to add parameters by Reach and macros from your external system (the system, which uses a server to fire a postback link). Reach provides the code itself.

Integration via pixel has several limitations:

  • AdBlockers affect pixel integration, and it can fail to work correctly.

  • It is more vulnerable to fraud, since all the code is available in a user's browser.

  • It does not support conversion statuses at further stages of an order/lead.

Pixel code work

You need to put a pixel code to a landing and thank-you (success) page. Landing page is a page where an end-user gets after clicking an ad to take a target action. Thank-you page or success page is a page where an end-user gets after doing a target action. For example, an end-user fills in a form, clicks Submit, and gets to some page upon clicking. You need to put a pixel code to the code of these very pages. There is no certain place in the page code.

You don't need to add a mandatory {click_id} macro for your tracking URL, if you use a pixel code. Click ID is recorded in a cookie file when an end-user makes a click. Once they get to a thank-you page, a pixel code triggers a cookie file and extracts a click ID, associated with a committed target action (a conversion). Thus, you receive information about a conversion from the thank-you page, and this conversion is already matched with a click ID recorded on Reach.

Pixel code on Reach

Postback is set up in Campaign setup > Integration setup > Set up the integration > JavaScript Pixel.

You see pixel examples only in the JavaScript Pixel drop-down menu.

The Landing page pixel helps record Click ID. There's no need to add the &click_id parameter, because the click is taken from a cookie file.

The Success page pixel already contains a mandatory parameter:

  • advertiser_id: the ID of the advertiser.

Still, you can update it with other parameters.

What to do next


Please contact Affise Customer Support team regarding all raised questions via the e-mail: [email protected].

Did this answer your question?