Home > Technical & Creative Skills > Tracking Campaigns

How do you fire conversion postback URLs on your own landingpages? (2)


09-01-2012 08:48 PM #1 izzy (Member)
How do you fire conversion postback URLs on your own landingpages?

This is for mobile traffic and mobile landingpages.

Thanks


09-02-2012 02:16 AM #2 zeno (Administrator)

I don't now much about mobile but if you're wanting to do a server2server postback with PHP it's relatively easy, can just put the code at the top of your lander or in an outgoing redirect script:

[PHP]
<?php

$subid1 = $_GET['subid1']; // get various passed subids

// postback call
$r = new HttpRequest('http://pixellocation.com/filename.php', HttpRequest::METH_GET);
$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
}
?>
[/PHP]


Home > Technical & Creative Skills > Tracking Campaigns