Follow

Pixel Integration

Time to read: 10 min

topic.pngThe article covers the following topics:

When it comes to performance marketing, one of the biggest questions you can ask yourself (or your advertiser) is what kind of conversion tracking protocol you want to use: pixel tracking or postback tracking.

A pixel tracking is an HTML code snippet that is loaded when a user visits a website or opens an email. It is useful for tracking user behavior and conversions.

There are 4 main pixel-based tracking methods: iFrame, JavaScript, Image, and Adwords pixels.

Image

<!--Offer Conversion: offer_name -->
<img src="https://demo.go2affise.com/success.jpg?offer_id=802" height="1" width="1" alt="" />
<!-- End Offer Conversion -->

Javascript

<!--Offer Conversion: offer name -->
<script language="JavaScript" type="text/javascript">var afoffer_id = 802;</script>
<script language="JavaScript" type="text/javascript" src="https://blabla2.com/track.js"></script>
<!-- End Offer Conversion -->

Iframe

<!--Offer Conversion: offer name -->
<iframe src="https://blabla2.com/success.php?offer_id=131802" height="1" width="1" />
<!-- End Offer Conversion -->

Adwords

<!--Offer Conversion: offer_name -->
<script language="JavaScript" type="text/javascript" src="https://demo.go2affise.com/gclid.js"></script>
<!-- End Offer Conversion -->

From an implementation perspective, all of the pixels work the same way.

Pixel tracking will place a cookie in the user's browser when a click occurred and will call back the cookie again on the conversion situation to authenticate the conversion. The conversion information can be extracted from that cookie and saved in Conversion Report.

How to set up pixel integration with your Affiliate?

In case you would like to proceed with a pixel integration with your affiliate, you can place their pixel manually in that affiliate’s settings ('Affiliates' section - > 'Affiliate Management' section - > Find the needed affiliate - > Edit) or ask him to do it by himself from the affiliate panel. 

To place an affiliate’s pixel manually, you should click at a dedicated button to add a new pixel and fill in the fields with the data such as determining offer, pixel code itself, type, and status of that pixel.

pixel.png

Where:

  • Moderation: set up as 'Approved' if you want this pixel code to work. 'Rejected' means you don't want this pixel code to work. 'Pending' means you're still thinking about letting the pixel code work.
  • Active: set up as 'Active' if you want this pixel to work right now. 'Not active' means the pixel code is not used in the integration process.

If the affiliate sets up the pixel code on his profile on Affiliate panel, the pixel will appear in 'Pixel management' tab:

Markup 2020-06-02 at 12.45.28.png

Once you make the pixel as 'Approved' or 'Rejected' in the Moderation column, it will disappear from this page. You can always change the 'status' of the pixel code on the affiliate edit page in the Admin panel.

import.pngOnce the affiliate adds the pixel code on his panel, it will be added to the list of his pixel codes on the affiliate edit page on the Admin panel automatically.

 The list of available macro for affiliate’s pixel:

{date} The date will be used according to the timezone selected at the affiliate's dashboard. If the timezone is not specified - UTC will be taken as a default.
{sub1} - {sub5} Subaccount 1 - Subaccount 5
{date} Date and time of conversion committing in format Y-m-d H:i:s
{city} City
{geo} Country

import.png If you are going to work with your affiliate by using a pixel, you should integrate with your advertiser with a pixel. The main point here is that you should provide your advertiser with a JS pixel exactly for such a flow.

Affiliate pixel is sent for conversions of all statuses.

How to set up pixel integration with your Advertiser?

As for setting up your pixel integration with your advertiser, you should choose a desired pixel type in the 'Offers' section - > 'Offer edit' page - > 'Postbacks' tab - > 'Integration pixels':

Annotation_on_2019-4-0.png

and provide your advertiser with it to let him implement it to the success page ('success page' is a page which a user will observe after completing the target action on an advertiser’s website).

It could be possible that you would like to implement some additional param to your pixel so your advertiser will pass extra data to you when the pixel is fired.

Below you can find a list of available parameters for Advertiser's pixel:

  • afid - unique request ID on advertiser's side
  • afprice - payout for conversion
  • afgoal - goal ID
  • afua - user-agent
  • afcomment - comment
  • afstatus - status of the conversion
  • afsecure - hash password generated on offer, advertiser level
  • custom_field1 - custom_field7  - custom field 1 - custom field 7

 Example of using an additional param for JS pixel:

<script language="JavaScript" type="text/javascript">var afoffer_id =802;
var afid={afid};
var afprice={afprice};
var afgoal={goal};
var afua={useragent};
var afcomment={comment};
var afstatus="1";
var afsecure="ff87d311f555f103683dc49b6ff393a2";
var custom_field1={extra_data};
var custom_field2={extra_data};
</script>
<script language="javaScript" type="text/javascript" src="https://tracking.go2affise.com/track.js"></script>

 Example of using an additional param for Image pixel:

<img 
src="https://tracking.go2affise.com/success.jpg?offer_id=802&afid={afid}&afprice={afprice}&afgoal={goal}&afua={useragent}&afcomment={comment}&afstatus=1&afsecure=ff87d311f555f103683dc49b6ff393a2&custom_field1={extra_data}&custom_field2={extra_data}" height="1" width="1" alt=""/>

 Example of using an additional param for Iframe pixel:

<!--Offer Conversion: Offer -->
<iframe src="https://tracking.go2affise.com/success..php?offer_id=131&afid={afid}&afprice={afprice}&afgoal={goal}&afua={useragent}&afcomment={comment}&afstatus=1&afsecure=ff87d311f555f103683dc49b6ff393a2&custom_field1={extra_data}&custom_field2={extra_data}" height="1" width="1" />
<!-- End Offer Conversion -->

 Example of using an additional param for Adwords pixel:

<!--Offer Conversion: offer_name -->
<script language="JavaScript" type="text/javascript">
var afid={afid};
var afprice={afprice};
var afgoal={goal};
var afua={useragent};
var afcomment={comment};
var afstatus="1";
var afsecure="ff87d311f555f103683dc49b6ff393a2";
var custom_field1={extra_data};
var custom_field2={extra_data};
</script>
<script language="JavaScript" type="text/javascript" src="https://tracking.go2affise.com/gclid.js"></script>
<!-- End Offer Conversion -->

import.png Advertiser's pixel is fired in status 'pending' ('2') by default. If you'd like to receive conversions in a certain status, use additional parameter 'afstatus=status' where 'status' should be replaced with a certain conversion status value. Ex. 'afstatus=1' for approved conversions. Conversions statuses and their values:

  • 1 – action is «approved» (paid by advertiser);
  • 2 – action is «pending» (decision in process, request status later);
  • 3 – action is «declined» (not paid by advertiser);
  • 4 – requested action «does not exist» (requested ID is not registered on advertiser's site);
  • 5 - action is «approved» and put on Hold (will be paid by advertiser at a certain amount of time - the period of hold is taken from the offer settings).

If you have more than one goal in the offer, and you would like to track all goals, the pixel should be installed separately for each goal. 

import.pngWe highly recommend using a secure (https) Tracking domain in any type of pixel. If http type of connection is used, always there is a chance of not recording of clickid in cookies, especially if the end-user uses Chrome 80 browser.

How to test pixel integration with Advertisers?

It should be noted, that an exact way the pixel has been fired by an advertiser and received by our server could be checked by navigating to Statistics -> Server postbacks.

import.pngIn the case of Pixel integration, the IP of the end-user is shown in the 'IP' column in Server postbacks slice.

There are some common types of issues of receiving a pixel at an Affise end.

1. Pixel received on Affise, but with an error “Missing mandatory clickid”Annotation_on_2019-4-3.png

There can be the following reasons for such an error:

  • chain of redirects has not been initiated by Affise tracking link: the link generated on Affise should be used to reach to the success page;
  • redirection was carried out with incognito mode enabled;
  • the Advertiser's site does not properly support the actual pixel type;
  • the tracking link in pixel code does not match the one used to initiate the chain: check the domain that was used in the Affise tracking link and the one placed in pixel code. They should be the same;
  • HTTP Tracking domain is used instead of HTTPS.

  2. Pixel  received on Affise, but with an error “Access denied”:

Annotation_on_2019-4-3__1_.png

 Reasons for such an error can be as follows:

  • Hash password has been generated on Affise but was not passed in pixel by implementing a parameter &afsecure=secure_postback_code (where 'secure postback code' is a code set either on the offer's level or advertiser's level or platform level).

3. Pixel received on Affise, but with an error "Access denied: wrong offer_id":

  • Once receiving a pixel with such an error message, the following situation has occurred: a user clicked on a tracking URL of Offer A (click information was saved in a cookie on Affise side) and reached the offer's landing page. After all, the same user opened Offer's B landing page without completing the whole redirection flow as in the 1st case and performed a target action ( a conversion). As a result, the conversion could have been recorded under Offer A. However, due to the 'offer_id' parameter validation you have in Affise pixel code, the system 'understands' that a click and a conversion have been performed for different offers. That's why an error message 'access denied: wrong offer_id' occurs.
  • If you see such a message, you can press on the data recorded in your postback logs under the 'postback parameters' column, find 'source' parameter and check from which landing page a conversion was made. This information will help you further with your investigation of why such conversion flow takes place for particular offers.

4. Pixel was not received on Affise. Reasons for it can be the following ones:

  • Pixel code was not implemented on the advertiser’s page.
  • There is some kind of error at the moment of pixel firing attempt.

How to test pixel integration with Affiliates? 

Affiliate's pixel is fired at the same time when Affise pixel is fired. There is no opportunity to check whether the affiliate's pixel was fired in UI.

The only way to check if the pixel is correct is to place it on the Success page when Affise pixel is already installed.

How can you check Advertiser's pixel set up?

1. First of all, you should check if an Affise tracking link leads to the advertiser’s link directly. For such a thing you should add &format=json to your tracking link and put it into your browser address bar:

Ex: https://demo.g2afse.com/click?pid=2&offer_id=912&format=json

Annotation_on_2019-4-1.png 

2. Proceed with all the steps to reach the success page where the pixel should be located. Meaning you should click at the Affise tracking link and then complete all the actions on the advertiser’s page, that should be done to reach the final page, where the pixel should be located.

3. When you are going to reach the success page, you should check the source code (crtl+U) to find out the pixel itself.

4. In case of success, you should observe a call-out record in your browser’s developer tools, as well as the cookie record with afclick value. If everything is going to be ok - > you should see a postback with status '1' response by navigating to ‘Statistics’ -> ‘Server postbacks' in your admin panel:

test.png

 

Sometimes, the pixel should be fired, but you don’t see it in your server's post-backs tab. In such a case, you should check your ‘network’ tab in the developer tools and try to find a call-out attempt. You can find out that it’s going to be red. There you can see the exact reason for that call-out block. Like “blocked: mixed-content”, which should be related to the usage of http instead of https. For more information on Developer's Tool work, refer to the related article.

In case you can’t even find out an exact call-out attempt, an issue should be at the advertiser’s end.

FAQ

Q: Can I use a postback integration with my affiliate in case I am integrated with my advertiser by pixel?

A: Yes, it is possible, because new conversion will be generated upon receiving a pixel from your advertiser and that exact conversion will trigger the postback.

Q: Can I use a postback integration with my advertiser in case I am integrated with my affiliate by pixel?

A: No. If you are integrated with your affiliate by pixel, you should be integrated with your advertiser by pixel. Moreover, in such a case, you should use a JS pixel just in any case. Even your affiliate uses iframe or image - you should send a JS for your advertiser. Otherwise, integration can be no stable. For example, you can receive a pixel from your advertiser, but an affiliate’s pixel will not be triggered.

Q: Should I add any kind of param/macro to my pixel to pass/receive a clickid?

A: No, the pixel will pass your clickid right to an advertiser’s page by cookie, which will be generated upon the click at your tracking link.

Q: There are a lot of broken pixels (without clickid) in the Server postbacks tab. How can I understand which of them is the one I am looking for?

A: All the pixels, even if they are broken, will have a source link in their description. By checking it, you can understand from what page this exact pixel is coming and even correlate it with that one in the offer’s tracking link field.

source.png 

Q: I would like to check the redirections steps and to complete the goal to test the pixel, but for this, I have to proceed with payment. What should I do?

A: Well, there is nothing you can do in case you don’t want to spend your money. Just check the steps described above and ask a client to clarify it with his advertiser.

Q: Which link should I use in the offer’s settings as a tracking URL, and should it be updated with parameters & macros?

A: You should use a direct link to your advertiser’s landing, which is located right before a success page. There is no actual need for some mandatory macros. Only in case, the advertiser would like to receive some extra data.

 article.pngYou may also find helpful the following Articles:

 If you have more questions on Pixel Integration, feel free to contact the Affise Support Team via support@affise.com or your Dedicated Account Manager.

Updated by Anastasia Deryugina

Was this article helpful?
5 out of 5 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.