Home > Tracking Campaigns > Binom

Postback from one aff. network to several trackers (4)


08-02-2018 04:37 PM #1 roman binom (Member)
Postback from one aff. network to several trackers

For whom will this script be useful?
1) If you use several trackers while using one offer in one network
2) If you switch from one tracker to another and don’t want to lose your old “lagging” conversions.

So. Step by step. To start you need to setup a custom script.

Here is the code:

Code:
<?php
$tmp = explode('_', $_GET['subid']);
$clickid=$tmp[1];
if (isset($_GET['payout']))
{    
    $payout='&payout='.$_GET['payout'];
}
switch($tmp[0]){
    case 'tracker1': header('Location: http://tracker1.com/postback.php?subid='.$clickid.$payout); break;  // for tracker1
    case 'tracker2': header('Location: http://tracker2.com/postback.php?subid='.$clickid.$payout); break;  // for tracker2
 
    default: header('Location: http://tracker3.com/postback.php?subid='.$_GET['subid'].$payout); break; // default, without prefix
}
?>
Change the prefixes tracker1, tracker2 carefully and change URLs http://tracker1.com/postback.php?subid= and http://tracker2.com/postback.php?subid= with your postback URLs.

For instance, in Binom postback looks as follows:
http://tracker.com/click.php?cnv_id={NETWORK_TOKEN}&payout={PAYOUT}
Full line:
Code:
case 'tracker1': header('Location: http://tracker.com/click.php?cnv_id='.$clickid.$payout); break;
The obtained script should be saved in the file postback.php somewhere on your server. In this example it is saved here: http://domain.com/postback.php

Then, in the affiliated network for Postback URL type
http://domain.com/postback.php?subid=#s2#&payout=#price#

This is an example for the Cake system (clickdealer, gotzha and etc.), in the other networks tokens #s2# and #price# can differ.

While adding offer to tracker # 1 write this URL:
http://cldlr.com/?a=xxxx&c=69080&s2=tracker1_{clickid}

For tracker # 2:
http://cldlr.com/?a=xxxx&c=69080&s2=tracker2_{clickid}

I did my best to explain it as simply as possible for people without a programming background.


08-03-2018 04:05 AM #2 erikgyepes (Moderator)

Amazing share Roman!

I actually had the same issue 2 days ago, when I was testing 1 offer in 2 trackers, wish I had this script before!


08-03-2018 04:09 AM #3 mitchell (Member)

Quote Originally Posted by erikgyepes View Post
Amazing share Roman!

I actually had the same issue 2 days ago, when I was testing 1 offer in 2 trackers, wish I had this script before!
How common is this? Were you just quickly testing 2 trackers to decide on which new tracker to use, or is it normal to be using multiple trackers at a single time?


08-03-2018 04:17 AM #4 erikgyepes (Moderator)

How common is this? Were you just quickly testing 2 trackers to decide on which new tracker to use, or is it normal to be using multiple trackers at a single time?
Good point.

It's the first option. I'm testing 2 trackers and I quickly wanted to feed the new one with real campaign, so I switched the postbacks to the new one.
The problem was that there were still old delayed conversions coming in, but as the postback has been changed they never come to the old tracker.

^^^ this script above perfectly fixes that issue.

But, yes it's not common setup most of the time.


Home > Tracking Campaigns > Binom