...

View Full Version : How do I mask this affiliate link?



gh05
01-06-2010, 10:43 PM
Hi, my site contains many affiliate links and usually I simply link to them by using a php redirect. I.e. I have
many folders (one for each affiliate program) containing an index.php file with the actual affiliate link and I
just link to this folder. This is usually simple but now I have some links as below containing javascript
and I don't want to break the tracking script. Can anyone tell me if I can do the exact same thing with this
type of link? Thanks.


<script language="javascript" type="text/javascript">
var myTarget='http://track.webgains.com/click.html?wglinkid=46986&wgcampaignid=67341&js=0';
var uri = 'http://track.webgains.com/link.html?wglinkid=46986&wgcampaignid=67341';
document.write('<a href="'+myTarget+'" target="_blank" onMouseOver="window.status=\'https://rec1.globalepanel.com/research/0903mskukedr/index.php?AID=lk2\';return true;" onMouseOut="window.status=\'\'"><img src="'+uri+'" width="120" height="60" border="0" alt=""/></a>');
</script>

CoffeeCup.com
01-07-2010, 02:50 AM
Hello,

Please visit the following sites to see if they can help you out:

http://www.tw3o.com/methods-to-mask-your-affiliate-links/
http://www.ajmcclary.com/how-to-mask-your-affiliate-links.html
http://forums.digitalpoint.com/showthread.php?t=99976

Hope this helps!!! :thumbsup:
CoffeeCup.com

knightcon
01-13-2011, 11:18 PM
One method commonly used is to create a javascript function, something like...



<script type="text/javascript">
function PaintAffiliateLink() {
var myTarget='http://track.webgains.com/click.html?wglinkid=46986&wgcampaignid=67341&js=0';
var uri = 'http://track.webgains.com/link.html?wglinkid=46986&wgcampaignid=67341';
document.write('<a href="'+myTarget+'" target="_blank" onMouseOver="window.status=\'https://rec1.globalepanel.com/research/0903mskukedr/index.php?AID=lk2\';return true;" onMouseOut="window.status=\'\'"><img src="'+uri+'" width="120" height="60" border="0" alt=""/></a>');
};
</script>


With that function in a separate javascript file named something like affiliate.js you can include it on your page and everywhere you want that affiliate link to appear on your page you simply use the PaintAffiliateLink() function, if the end user looks at the source code all they will see is the paint function, they won't see the details on your affiliate link but just as a side note if you are wanting to hide the fact that it is an affiliate link and redirect the user so that they can't tell that it is hosted on Google AdSense for instance, double check the terms and conditions of your affiliate service because many of them have clauses which state you may not mask the URL or hide the fact that it is an affiliate link. Could result in your affiliate status being revoked.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum