Affiliate Citizen

Affiliate Marketing from One Man in the Thick of the Action

14  10 2007

Cool Things to do with your Affiliate Redirect Script

The Script

This post takes the affiliate redirect script tutorial I posted previously here and suggests ways you can build upon it, apart from the obvious redirection to the merchant’s page.

The Redirect

Now although users dont actually see any kind of redirect because the PHP script is server side it is nonetheless something they do pass through and so we can take advantage of that fact. Ok lets get down to some cool ways in which you can enhance your simple redirect:

Cool Thing 1: Make a ‘Popular Products’ Database

If you have a site which relies on a datafeed to populate it, whether it be from a sole merchant or in the form of price comparison, you can use this method to create a pseudo popular products section on your site. I say pseudo becuase you wont be able to tell which products have actually been sold, just which products interested the users (and prompted a clickthrough your redirect script).

Im not going to go through the technical aspects of this completely, im just going to cover the theory but suffice to say you will need a database backend of some kind installed on your server. If anyone wants to explicitly know how to do this please email me and if there is enough demand I will set it out in a single post. The same goes for the other 4 cool methods ill outline later. Now..onto the ‘Popular Products’.

Ok so you have a page of products infront of the user, lets say for example you have 10 different mobile phones. Each one is connected to your redirect script which then queries the database for the correct deeplink to carry the user over to the merchant. All well and good. To make the popular products DB you will need to also get additional row values from the DB. This could be, in addition to the deeplink, the name, price, id (unique id) and description. You will then need to construct a new query which adds this information into a NEW popular products DB. Be sure to also add a datetime value for each row as you can then display a ‘recently viewed’ popular products bar on your homepage which is constantly freshened by users clicking on your site! Why not also add deeplinks to the product pages on your site into the DB?

Cool Thing 2: Send Yourself an Email when a product is clicked.

This is for those of you who are really analytical in your approach and require that extra level of granularity without using a DB or log. I use this approach to guage the popularity of some areas while using PPC or sometimes SEO. It gives me a sense that the site is live and things are happening. You can also get a good feel for tallying up clicks on either the PPC engine you are using or the merchant/network’s reporting interface.

Ok, heres an example bit of code. It assumes you have queried the DB already and pulled out any info you may need to send in the email  to yourself.

///////////////////////////////SENDTRACKING MAIL///////////////////
$emess = "CLICKTIME: $time\n\n";
$emess.= "PRODUCT NAME: $name \n";
$emess.= "LINK: http://www.yousite.com/productdeeplinkpage.php"\n";
$ehead="From: YOUR WEBSITE";
$subj = "CLICKTHROUGH FROM PRODUCT SECTION";
$mailsend=mail("you@yoursite.com,","$subj","$emess","$ehead");
/////////////////////////////////////////////////////////////////////////

So this little bit of code will send you an email with the clicktime (using PHP’s time functions to establish the NOW time), the product name (pulled from  the DB) and a link to the page the user has clicked on - just for fun.


3 Responses to “Cool Things to do with your Affiliate Redirect Script”

  1. I am interested in the Make a ‘Popular Products’ and recently clicked database. I have no idea how to do this.
    If it is possible to run a step by step guide I would read it

  2. Hi Purple.

    If I get a few more requests ill certainly post up how to go about it

  3. hi, I would definitely be interested in a tutorial of how to build a mysql database backend to the php affiliate jump script. cheers, rob

Leave a Reply

« Gut Instinct and Tmesis in Affiliate Marketing Merchants who Have Daft Ideas about PPC Bidding »