I've had a few people tell me I can code one main file with all the pixels I want to fire INSIDE the file - but no one can explain to me how to do this. Does anyone know how I can setup a file that will trigger multiple pixels?
can do it automatically in CPVlab...not a huge help if you dont have it i know.
Yeah unfortunately I do not.
Lets say the first pixel would be site.com/pixel.php
Then in that file you would just have
<img src="site.com/pixel2.php>
<img src="site.com/pixel3.php>
So that's all you have to do? Make a .php file with the pixels inside it? Any other code at all that needs to go inside?
Yep , just put all in there.
So after I put all the img pixels inside the .php file can I just insert the url (domain.com/pixels.php) as a postback url inside the affiliate network (direct track)?
I imagine this works provided the placed PHP/HTML file is loaded by the client on the offer page, but probably wouldn't work if conversions were triggered between the offer <-> network/you by server2server calls. In that instance you can do it easily with postbacks - i.e. postback 1 from network/offer -> PHP file on your server which then fires multiple postbacks from there, with subid info passed through. You could use code like this:
[PHP]
<?php
$subid1 = $_GET['subid1']; //or whatevs, get yo subids in check
$subid2 = $_GET['subid2'];
// postback declaring conversion
$r = new HttpRequest('http://pixellocation.com/filename.php', HttpRequest::METH_GET); //whatever you would normally have up until the ? point
$r->addQueryData(array('something' => $subid1,'somethingelse' => $subid2)); //adds ?value=something&value2=somethingelse to URL above
//overall this will call the URL http://pixellocation.com/filename.php?something=$subid1&somethingelse=$subi d2
// send request
try {
$r->send();
if ($r->getResponseCode() == 200) {
// do nothing, this means the conversion has been counted properly
}
} catch (HttpException $ex) {
// do nothing or log that the call failed
}
// second postback declaring conversion yet again
$r = new HttpRequest('http://pixellocation2.com/filename.php', HttpRequest::METH_GET);
$r->addQueryData(array('something' => $subid1,'somethingelse' => $subid2));
// send request
try {
$r->send();
if ($r->getResponseCode() == 200) {
// do nothing, this means the conversion has been counted properly
}
} catch (HttpException $ex) {
// do nothing or log that the call failed
}
?>
[/PHP]
Works flawlessly for me, server2server ftw.
Hey guys just to clarify, is this what my PHP file should look like if I'm trying to trigger POF pixel + Prosper pixel (hosted on my domain)?
I think with prosper atleast. You still need to get the subid and append it to the url.
So something like this:
[PHP]
<?php
$subid = $_GET['subid'] ? $_GET['subid'] : '';
?>
<img height="1" width="1" border="0" style="display: none;" src="http://www.PROSPERDOMAIN.com/tracking202/static/gpx.php?amount=&subid=<?php echo $subid ?>" />
<img src="http://t.ads.pof.com/cc.aspx?a=eG94f61oa2XqbWFsZmpuY2to" style="display:none">
[/PHP]