I'm sure this translates to almost any CPA company using DT, but since Copeac is the only one I've done this with, I'll address it based on that assumption.
First, WTF are postbacks? A postback is a pixel that they fire on their offer when you get a conversion, then it hits a script on your server. There are two $_GET statements that it will send: SID and PID.
The SID is a value that you passed to them in your affiliate URL.
Where I have {SID} you would put your information, be it an email address, customer's name, whatever. So, if you want to use the email address, the code would look like:
BTW, the above URL's are just examples.
Here's a simple postback script (in PHP):
Yeah, it's ugly, but it works. What's happening there: when I get the postback, it's being sent to:
I'm catching the email address and updating my database to reflect that a conversion has been made.
There is a catch, you can only have one postback URL per account. If you have multiple sites that use different databases on different sites / servers you'll have to set up multiple accounts with Copeac. This really isn't that big of a deal, just let your account manager know what's going on. Also, you can only pass across one piece of information to them, so you'll need to be able to cross reference your database to piece together the rest. I'm using the email to do that.
The thing that I really like about postbacks is it makes it very easy for me to see what traffic is converting. That way, if I'm advertising on multiple sites, I can quickly determine which ones are paying for themselves and which ones need to be dumped.
First, WTF are postbacks? A postback is a pixel that they fire on their offer when you get a conversion, then it hits a script on your server. There are two $_GET statements that it will send: SID and PID.
The SID is a value that you passed to them in your affiliate URL.
Code:
http://www.cpaclicks.com/secure.asp?e=fdsafdsafdas&d=0&l=0&o=[COLOR=Cyan][B]{SID}[/B][/COLOR]
Code:
http://www.cpaclicks.com/secure.asp?e=fdsafdsafdas&d=0&l=0&o=[COLOR=Cyan][B]bobo@bobo.net[/B][/COLOR]
Here's a simple postback script (in PHP):
Code:
<?php
mysql_connect('localhost','user','password');
mysql_select_db('database');
$email = $_GET['SID'];
$program = $_GET['PID'];
$query = "UPDATE table SET conversion=1 WHERE email='$email'";
$query1 = "UPDATE table SET copeac='$program' WHERE email='$email'";
mysql_query($query) or die(mysql_error());
mysql_query($query1) or die(mysql_error());
mysql_close($conn);
?>
Code:
http://www.MySite.tld/postback.php?SID=email@address.tld&PID=2305
There is a catch, you can only have one postback URL per account. If you have multiple sites that use different databases on different sites / servers you'll have to set up multiple accounts with Copeac. This really isn't that big of a deal, just let your account manager know what's going on. Also, you can only pass across one piece of information to them, so you'll need to be able to cross reference your database to piece together the rest. I'm using the email to do that.
The thing that I really like about postbacks is it makes it very easy for me to see what traffic is converting. That way, if I'm advertising on multiple sites, I can quickly determine which ones are paying for themselves and which ones need to be dumped.