Editing Affiliate HTML Code (New Window)

5 replies
Hi,

I have added a banner to my site however it does not open a new window but instead transfers to the merchant in the same window. Am I able to edit the code to include a blank window link?


<!--START MERCHANT:merchant name *********.-->
<a href="**************"><img src="************" border="0"></a> <!--END MERCHANT:merchant name *********-->



<!--START MERCHANT:merchant name *********.-->
<a href="**************"><img src="************" border="0" target="_blank" ></a> <!--END MERCHANT:merchant name *********-->
#affiliate #code #editing #html #window
  • Profile picture of the author Mike Hlatky
    <a href="**************">

    becomes:

    <a href="**************" target="_blank">

    You need to put the target="_blank" in the <a> not the <img>
    {{ DiscussionBoard.errors[8423258].message }}
  • Profile picture of the author JohnMcCabe
    Originally Posted by justlukeyou View Post

    Hi,

    I have added a banner to my site however it does not open a new window but instead transfers to the merchant in the same window. Am I able to edit the code to include a blank window link?


    <!--START MERCHANT:merchant name *********.-->
    <a href="**************"><img src="************" border="0"></a> <!--END MERCHANT:merchant name *********-->



    <!--START MERCHANT:merchant name *********.-->
    <a href="**************"><img src="************" border="0" target="_blank" ></a> <!--END MERCHANT:merchant name *********-->
    Your second example is close, but the target="_blank" is in the wrong spot (the forum software adds the 'rel=nofollow' bit automatically - ignore it for this example). Put it after the a href="url" statement like this:

    Code:
    <!--START MERCHANT:merchant name *********.-->
    <a href="**************" target="_blank"><img src="************" border="0"  ></a> <!--END MERCHANT:merchant name *********-->
    {{ DiscussionBoard.errors[8423269].message }}
    • Profile picture of the author VinnyBock
      When I use banners on my own site I simply copy and save the image, I name that image the banner size (ie. offer250x250.jpg) and then use the appropriate tracking/sub-id's for the image link, then I can easily decide if I want the link to open in a new tab or not...

      If its just an affiliate offer this is fine, if its for adsnse or a publisher banner than I just wasted 3 minutes I'll never get back..
      Signature

      {{ DiscussionBoard.errors[8423297].message }}
  • Profile picture of the author justlukeyou
    Thanks,

    So as long as the affiliate link is intact is it okay to change the HTML?
    {{ DiscussionBoard.errors[8423288].message }}
    • Profile picture of the author JohnMcCabe
      Originally Posted by justlukeyou View Post

      Thanks,

      So as long as the affiliate link is intact is it okay to change the HTML?
      Yes, mechanically. You may want to double check your affiliate agreement to see if this kind of change is forbidden.

      Since it still requires the reader to actively click the link, and the link isn't hidden, I can't imagine why there would be a problem. But then again, I didn't write the affiliate agreement.

      A few minutes spent scanning the TOS is cheap insurance.
      {{ DiscussionBoard.errors[8423931].message }}

Trending Topics