Xavier What we have to say on Twitter
Xavier Xavier

Xavier Media®

 line

  Subscribe by email Subscribe via email

  Feed link Subscribe via RSS
  What is RSS? What is RSS?

  MyXavier Follow @XavierMedia

  Twitter Follow @XavierMedia

  Facebook Our Facebook page

XavierMedia.com

Webmaster Tools

Keywords

RSS iPhone and iPad stuff – Most Useful Things

Photo by Andreas Bylund

How to hide your affiliate links – part 2

August 7th, 2009 by Andreas from Xavier Media® in Affiliate Programs, SampleAddress.com, The World According to Xavier, Tutorials. Topics: , , , ,

In part one of this series I showed you how to mask your Clickbank affiliate hoplinks using Clickbanks built in link masking. This is however not an optimal solution since the links still say clickbank.net in the URL. Therefore we're going to have a look at  Javascripts to mask links instead.If you've never worked with Javascript before this may seem extremely technical, but we'll start with an easy example.

The simple Javascript redirection

This code works great if you only have one link per page you need to protect. Add this code somewhere between the <HEAD></HEAD> tags in your code:

<SCRIPT LANGUAGE="JavaScript">
<!–

function Redirect(){
window.location = "http://www.sampleaddress.com";
}
// –>
</SCRIPT>

Just fill in the URL you want your visitor redirected to instead of http://www.sampleaddress.com and you're almost ready to test the script. Now you need to create a link somewhere in your page. The link need to look like this:

<A HREF="javascript:Redirect();">Test link</A>

As you can see we're using some code instead of filling in the URL to the page in the code above. This is because when this link is clicked on by the visitor the script will be executed redirecting the visitor to http://www.sampleaddress.com or whatever link you filled in instead.

The advantage with this code is that the user can't see where the link is going by just holding the mouse pointer over the link. In the browsers status bar they will just see this:

Javascript Redirection: Browser status bar

In next part of this series I will show you how to setup a Javascript for multiple links and also how to move the script to a separate file to hide the links even more.

About the author
Andreas co-founded Xavier Media® in 1996 and has since been involved in all kinds of development, marketing and making money online.

 

You may also be interested in...
How to hide your affiliate links – part 3
How to hide your affiliate links – part 1
How to hide your affiliate links – part 5

Subscribe to new posts from this blog

Leave a Reply

Powered by WP Status.net plugin.

RSS XavierMedia.org

RSS Easy PLR

 line
 line  line
 line © Copyright 1996-2012 Xavier Media®. All rights reservered.
Contact us | Support/help | Privacy Policy | Company Info
The World According to Xavier | Domain Names