Cloakig Affiliate Links
There is lots of stuff online about cloaking affiliate links. Many times you don’t want to put a big long link in the status bar. Other times you don’t want people to know they are going to navigate away from your site. Sometimes you just want your links to look pretty. But for me, I often rotate affiliate companies looking for the best conversion. This will cause me to find every link that points to that merchant to swap it out.
Let me just show an example:
You are selling a widget with the referral link of:
http://www.anyaffiliate.com/theproduct.php?mid=4588&id=77832
That is not really pretty. Especially when your domain is nurseknowledgetoday.com or something like that. A better referral link might be
http://www.nurseknowledgetoday.com/jump.php?m=widget
The advantage with this is that you can make all your links similar. Product number two could be:
http://www.nurseknowledgetoday.com/jump.php?c=product2 or whatever modifier you want.
This is going to be a down and dirty tutorial so follow along. I am neither a coder nor a teacher so show some grace.
Make a page and title it whatever little cleaver thing you will like. We will keep with the nursing theme (for reasons I do not know) and call it health.php.
Within health.php
<php
if ($c == “”) {$link = “http://nurseknowledgetoday.com“;} //Homepage
if ($c == “widget”) {$link = “http://www.anyaffiliate.com/theproduct.php?mid=4588&id=77832″;}
header(”Location: $link”);
if ($c == “product2″) {$link = “http://www.zxmp.com/theproduct.php?mid=a9d57″;}
header(“Location: $link”);
exit();
?>
Then if you use the link:
/health.php?c=product2
it will take you to
http://www.zxmp.com/theproduct.php?mid=a9d57
- $l - This is the ID that determines which link the user is directed to. For instance if c=widget then the user would get directed to the first link. If product 2, then they would be redirected to the second link.
- $link - This is the link we do not want revealed.
- header() - This is the redirect PHP code. The requested page for us will be the $link URL.
Now if you decide to change affiliates for one of these products, you don’t have to find every instance, just change the one line of code.
Hope this helps!
—————-
Now playing: Robin Mark - How Great Are You Lord
Posted by Carl Thomas / Affiliate Preacher on August 28th, 2007









Be The First To Comment on: "Cloakig Affiliate Links"