Welcome to WebmasterWorld Guest from 54.146.194.42

Forum Moderators: incrediBILL

Message Too Old, No Replies

html redirect affiliate link - open in new window?

html redirect affiliate link

     
6:12 pm on Sep 21, 2012 (gmt 0)

New User

5+ Year Member

joined:May 25, 2010
posts: 2
votes: 0


Hi, just wondering how you suggest getting the redirect page to open up in a new window. I'm a newb, help me out

I currently am tracking my outbound links in google analytics using code as follows:

<a href="http://www.mysite.com/product.html" target="_blank" onClick="recordOutboundLink(this, 'Outbound Links', 'MyOutboundLink1');return false;"></a>

the .html address is the redirect page to my affiliate link


It doesn't seem to consider the target="_blank" when the onclick tracking is in there.

Here is my redirection page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0; url=http://www.affiliateprogram.com/products/some_product?affiliateid=482196">
<title>Affliate product 1</title>
</head>

<body>
</body>
</html>



Any suggestions on how to make it open in a new window? For links that don't have the outbound links tracking code, it works fine obviously.

Thanks
11:11 pm on Sept 21, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 7, 2003
posts:4783
votes: 0


You could call window.open in the onclick javascript to open a new window...
11:55 pm on Sept 21, 2012 (gmt 0)

New User

5+ Year Member

joined:May 25, 2010
posts: 2
votes: 0


could you show me how to do that, can you put the window.open into this link for me please, i'm really clueless how to do that properly, your help is much appreciated

<a href="http://www.mysite.com/product.html" target="_blank" onClick="recordOutboundLink(this, 'Outbound Links', 'MyOutboundLink1');return false;"></a>