Making a postback URL fire an image pixel?

mpbiz

New member
Apr 29, 2010
2,824
57
0
Right now I am using postback URL conversion tracking, but I need to be able to fire an image pixel as well. The only problem is I can't get my image pixel placed on the conversion page.

Is there a way to fire an image pixel after firing a postback URL? I'm using cpvlab which can't be modded, but not necessarily looking for advice for a specific tracking platform anyways.

Just want to see if it's possible to make a postback URL fire an image pixel as well.
 


Are you trying to fire the image pixel by yourself? By firing the image pixel, it means you had a conversion. But if you want to test if your is working, you can request your AM to do a test for you.
 
You could try something like this:

Code:
<?php
$amt = (isset($_GET['amt'])) ? $_GET['amt'] : '';
$sid = (isset($_GET['sid'])) ? $_GET['sid'] : '';

$ch = curl_init();
$link = "http://domain.com/postback.php?amount=$amt&subid=$sid";
curl_setopt($ch, CURLOPT_URL, $link);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_exec($ch);
curl_close($ch);

header('Location: http://domain.com/pixel.jpg');
?>
 
  • Like
Reactions: mpbiz
A postback is done by a server calling a URL. A pixel is client-side. You can make a pixel into a postback, but you can't do it the other way around.
 
Right now I am using postback URL conversion tracking, but I need to be able to fire an image pixel as well. The only problem is I can't get my image pixel placed on the conversion page.

Is there a way to fire an image pixel after firing a postback URL? I'm using cpvlab which can't be modded, but not necessarily looking for advice for a specific tracking platform anyways.

Just want to see if it's possible to make a postback URL fire an image pixel as well.
If your image pixel depends on cookies for tracking, which most do, you are out of luck because anything triggered by the postback URL will not have access to the cookies.

If you don't need cookies in your image pixel script, then what candy33 coded should work - unless the server making the postback URL call does not respect redirect requests. If you want to be 100% safe in this situation (no cookies needed), you should code your pixel logic into your postback code.
 
  • Like
Reactions: mpbiz
If your image pixel depends on cookies for tracking, which most do, you are out of luck because anything triggered by the postback URL will not have access to the cookies.

If you don't need cookies in your image pixel script, then what candy33 coded should work - unless the server making the postback URL call does not respect redirect requests. If you want to be 100% safe in this situation (no cookies needed), you should code your pixel logic into your postback code.

Thanks for all of the responses but MaxSteve you nailed it. I realized late last night that this won't work because the image pixel depends on the cookie.

Does anyone know if it would be possible to pass cookie information via the postback so that the image pixel would be able to successfully fire?
 
Thanks for all of the responses but MaxSteve you nailed it. I realized late last night that this won't work because the image pixel depends on the cookie.

Does anyone know if it would be possible to pass cookie information via the postback so that the image pixel would be able to successfully fire?
It's not possible, because the server that does the postback won't have access to the cookies either.

One implementation that works is for you to store any info you need on the transaction internally in your system. Assign a unique identifier to that info and pass it on the click to the campaign. If the click converts, have the campaign postback to you the unique identifier you sent so you can lookup the info you stored in your database.
 
A postback is done by a server calling a URL. A pixel is client-side. You can make a pixel into a postback, but you can't do it the other way around.

Eh you can but you will need to pass some sort of tracking variable like a trans id or click id that would start when the customer clicked the link or hit the page