Pixel integration (C2S) (admins)
Natalya Yefimenko avatar
Written by Natalya Yefimenko
Updated over a week ago

Pixel or client-to-server integration

Client-to-server (C2S) or pixel integration is used to get a notification on a conversion from an advertiser's product page. This integration involves a pixel generated on Affise: a special code snippet, which is loaded when a user visits a website.

Usually, a pixel contains a cookie file that gets a click ID of a user.

When a user visits a website with the pixel, the user’s browser process the code. Since the pixel contains the link to the Affise server, a browser follows this link. Every time the Affise server gets an inquiry from the browser, it registers the action. As a result, you see conversion info in the system.

You should use the C2S integration when advertisers and affiliates don't have their tracking systems: pure links don't work in this case. Also, use this integration when an advertiser's side server can't pass conversion info.

Pixel tracking places a cookie in a user's browser when a click happened. Then, it calls the cookie back when conversion happens to authenticate it. The system extracts the conversion information from that cookie and saves it in Statistics > Conversions.

Advertiser pixel

You take the advertiser pixel in the offer settings: Offers > a certain offer > Postbacks.

On Affise, there are the following types of pixel:

Image pixel

It is one of the first options in tracking conversions in the industry.

You can use the image pixel tracking protocol for offers in other tracking systems that do not support other tracking methods.

The success page pixel:

<!--Offer Conversion: 10123 -->
<img
src="https://abbbc.g2afse.com/success.jpg?offer_id=1440225"
height="1" width="1" alt=""/>
<!-- End Offer Conversion -->

It does not require click ID.

Java Script

JS pixel is a code that can track the page a user came from, the time they spent on the page, and other details besides the number of page hits.

The landing page pixel:

<script language="javascript" type="text/javascript">function sc(v){let d=new Date();d.setTime(d.getTime()+(365*24*60*60*1000));document.cookie="affclick="+v+";"+"expires="+d.toUTCString()+";path=/";localStorage.setItem('affclick',v)}sc((new URLSearchParams(window.location.search)).get("clickid"))</script>

It requires click ID.

The success page pixel:

<!--Offer Conversion: 10123 -->
<script language="javascript" type="text/javascript">var afoffer_id = 1440225;</script>
<script language="javascript" type="text/javascript" src="https://abbbc.g2afse.com/track.js"></script>
<!-- End Offer Conversion -->

Java Script (Direct)

The landing page pixel:

<script language="javascript" type="text/javascript">function cid(){var e;return Promise.resolve().then(function(){return null===(e=new URLSearchParams(window.location.search).get("pid"))?null:fetch("https://abbbc.g2afse.com/click?pid="+e+"&offer_id=1440225&format=json").then(function(e){return e.json()})})}function sc(e){var n=new Date;n.setTime(n.getTime()+31536e6),document.cookie="affclick="+e+";expires="+n.toUTCString()+";path=/",localStorage.setItem("affclick",e)}!function(){var n;Promise.resolve().then(function(){return cid()}).then(function(e){null!==(n=e)&&sc(n.clickid)})}();</script>

It requires publisher ID.

The success page pixel:

<!--Offer Conversion: 10123 -->
<script language="javascript" type="text/javascript">var afoffer_id = 1440225;</script>
<script language="javascript" type="text/javascript" src="https://abbbc.g2afse.com/track.js"></script>
<!-- End Offer Conversion -->

iFrame

iFrame pixel is similar to Image pixel, but it can hold more pixels inside it, which you add for your affiliates.

The success page pixel:

<!--Offer Conversion: 10123 -->
<iframe
src="https://abbbs.g2afse.com/success.php?offer_id=1440225"
height="1" width="1"/>
<!-- End Offer Conversion -->

It does not require click ID.

🔎 An advertiser implements the pixel to the success page after the opening <body> tag. Java Script pixels are implemented to the landing page and to the success page after the opening <body> tag. Success page is a page that a users sees after completing the target action on an advertiser’s website (landing page).

Affiliate pixel

Affiliates provide you with a pixel themselves. You should add the affiliate pixels to the Affise system, and the system sends information about conversions to an affiliate.

What to do next


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

Did this answer your question?