Forum Moderators: open

Message Too Old, No Replies

Hiding Long Affiliate Links

Need information...

         

Texas

7:52 pm on Jun 10, 2002 (gmt 0)

10+ Year Member



Hiding Affiliate Links...

I need some help with a link. It works OK, but I'd like it to open in the same window. Right now it opens a new one. Here's the code:

<a href="http://www.somewhere.com" onclick="window.open('http://www.somewhere.com/index.asp?trackerid=38001');return false">a product</a>

Any advice much appreciated.

Texas

korkus2000

7:55 pm on Jun 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you trying to open a new window and target all of your links to that window or just targeting the main window?

If you want to avoid opening a new window the use a window.location = instead of window.open.

JamesR

8:24 pm on Jun 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What about running the affiliate link through a cgi script? SSI lets you use URL forwarding and you could get the affiliate code off the page completely.

Texas

8:33 pm on Jun 10, 2002 (gmt 0)

10+ Year Member



Yes I would like to target the main window. Can you give an example of your suggestion for window.location=?

buckworks

8:34 pm on Jun 10, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Here's another way to do it, based on the link-hiding code provided by Commission Junction.

<a href="http://theaffiliatelink.com/tracking/blahblah/" target="_top" onmouseover="window.status='http://www.merchantsite.com';return true;" onmouseout="window.status=' ';return true;">Your Link Text</a>

If a visitor is surfing with javascript turned off, you will still get credit for the click. I don't think that would be the case with the way you showed in the first post.

Texas

8:53 pm on Jun 10, 2002 (gmt 0)

10+ Year Member



Yes I am familiar with the mouseover for window status. However, I would still like to use the link configuration mentioned at the beginning of this string.

Again, using the following link config, does anyone know how to get the link to open in the main window instead of opening a new one?

<a href="http://www.somewhere.com" onclick="window.open('http://www.somewhere.com/index.asp?trackerid=38001');return false">a product</a>

DrDoc

12:32 am on Jun 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not just do this?

<a href="http://www.somewhere.com/index.asp?trackerid=38001">a product</a>

tedster

1:22 am on Jun 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the idea is to hide a long affiliate ID string, you could try:

<a href="http://www.somewhere.com" onClick="location.href='http://www.somewhere.com/index.asp?trackerid=38001';return false;">a product</a>

Texas

4:51 pm on Jun 11, 2002 (gmt 0)

10+ Year Member



Thanks Tedster, it works perfect.

However, you know what? I've been thinking. Although this technique hides an affiliate link completely and it does open the aff coded url in the main window, at the same time it can also be defeated by any average user, even inadvertantly.

If a visitor right clicks to copy the shortcut, then pastes the link into the address bar, the affiliate tracking code will fail. If a visitor right clicks then selects open in a new window (as many people have learned to do), then again your affiliate code will be lost.

The more I think about it, I'm more inclined to use either a refresh page (url redirect) as I have been using, or buckworks' old-time favorite above using the status bar disguise.

Many thanks to all replies,

Texas

soapystar

12:10 pm on Aug 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



why does everyone forget to add

onclick="window.status='http://www.merchantsite.com ';return true;"

without which the cloak is pointless