Login · Register
Home About Blog

Auto Postback Script

Justin Rumpf has graciously donated his auto-postback script for the Prosper202 community. If your affiliate network allows post back URLs, you can have them set the postback URL to point to this php script on your server, which will automatically update your subids for you as they come in. This means you wouldn't have to manually update your subids any more for the offers you run that support the post-back urls! Thanks Justin!

The Script

<?php

//**AUTHOR**: Justin Rumpf - Sixfoot3 Media

//This script was created to create automatic postbacks to prosper202 tracking from
//your affiliate network to your tracking.

//**INSTALLATION**: drop this page into your root tracking domain. this should be
//the same folder that you find 202-config.php in.

//**EXAMPLE**: you would give your affiliate network 
//http://mytrackingdomain.com/pb.php?subid=!!!subid!!!

//every time you get a conversion your affiliate network would fire off this url with the 
//subid  filled in instead of !!!subid!!!

//this will make it so you dont have to update your leads every day as they are 
//automatically  updated when the conversion happens.

// grabs your databse username and password to be able to update the database
include('202-config.php');
//grabs the subid out of the url
$sub $_REQUEST['subid'];
//connect to database
MySQL_connect("$dbhost","$dbuser","$dbpass");
//selects the database from 202-config.php
mysql_select_db($dbname) or die("Could not select database");
//update the lead column in 202_clicks table
mysql_query(" UPDATE 202_clicks SET click_lead=1 WHERE click_id='$sub'");
//update the lead column in the spy view table
mysql_query(" UPDATE 202_clicks_spy SET click_lead=1 WHERE click_id='$sub'");
//thanks message
echo "<BR>Thanks!<BR><BR>";
//you could easily double check the database for the insert here and give a different
//message if something went wrong.
?> 

Responses

  1. Charlar on Sep 25, 2008 at 3:20pm

    Firstly thanks to this script (Justin) and Prosper202 of course. I just wanted to check if I'm doing this right - I'm just a loser geek on php :)

    I use azoogle, so I've changed the "//http://mytrackingdomain.com/pb.php?subid=!!!subid!!!" to //http://mydomianandsubdomain.com/pb.php?subid=%%subid%%" and set it as the universal pingback url on the azoogle panel. (Used %% instead of !!! because that is the syntax in azoogle?)

    and entered my dbhost, user and pass in the script, saved it as a php file (pb.php) and uploaded it to the root of my prosper202 installation, is this correct?

  2. Wes Mahler on Sep 25, 2008 at 3:33pm

    We actually went ahead and put the post back URL into the new version of prosper202 1.1.0. If you goto SETUP STEP 8, it will have the post-back url to use for you integrated in already, that'll make it alot easier for ya

  3. Charlar on Sep 27, 2008 at 4:06am

    Thanks for the reply Wes, I hadn't realized that even though I had updated to 1.1 a few weeks ago, it's neat! I got the link and pasted it to the affiliate panel, let's see how it goes...

    By the way is there a difference between the tracking pixel, and the Post back URL? Which do you use, both?

  4. Wes (MasterlessSamurai.com) on Nov 05, 2008 at 11:04am

    does anyone have a list of the CPA networks that support postback pixels (auto inserted). The only one I've come across is Neverblue, who makes it extremely easy to get your tracking up. Most of the others you have to wait on your affiliate manager.

  5. ricardo on Nov 06, 2008 at 5:25am

    @Wes:

    Copeac does support this as well.

  6. anon on Jan 25, 2009 at 5:06pm

    Someone should fix this script so you can not inject SQL into it!

  7. Wes Mahler on Jan 26, 2009 at 1:51am

    This script is actually no longer needed, as it is now built into the p202 1.2.0. and it does prevent sql injection (will remove this script)

  8. DavidDOchoa on Nov 01, 2009 at 8:43pm

    Wes, script is still here, lol.

  9. Sundeep on Nov 21, 2011 at 6:55am

    I have been confusing myself between post-back URLs, tracking pixels, Affiliate Networks, Prosper202 and Search7 trying to setup mys system to do complete analysis. Can someone recommend a good guide on the subject which clears all aspects on the matter.

  10. TonyH on Dec 03, 2011 at 7:17pm

    Hey Sundeep, I'm only answering your post because I hate it when I never get an answer about important sh*t like this. I've looked believe me for a guide about tracking and there is nothing I can find that you can rely on professionally.

    There are plenty of authoritative books on analytics but none on tracking sales.

    If any future readers of this has an answer please take a minute to post it.

  11. dmob on Jan 09, 2012 at 12:40pm

    thank you so much sir i need this badly as i started cpa recently.

  12. Sundeep on Feb 04, 2012 at 4:37am

    Thank you TonyH for taking time to write your reply. I still haven't found anything useful as yet myself.

  13. david on Feb 28, 2013 at 10:20pm

    i hope someone out there has read this and found a manual of some sort for us to reference to get this done properly that is professional? maybe a video? anybody?

  14. kifli bin baba on Apr 12, 2014 at 4:01am

    I wish if this programe can help me to an online extra incomes?

  15. Sistema venus on Sep 14, 2014 at 3:00pm

    Thanks for the reply Wes, I hadn't realized that even though I had updated to 1.1 a few weeks ago, it's neat! I got the link and pasted it to the affiliate panel, let's see how it goes...

    By the way is there a difference between the tracking pixel, and the Post back URL? Which do you use, both?

Leave a Reply

Name (required)

Email (will not be published) (required)

Website

What does 4 + 4 equal? (required spam filter)


Creative Commons License This work (Prosper202, Tracking202 and Export202) is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.