Tuesday, October 05, 2010

Make Amazon banner (iFrame) open in new window

"Do me a favor, explain how to open an Amazon banner in a new window. Thanks."

The question would be as the same as asking how to make an iFrame open in new window because Amazon uses iFrame for its banner.

Let's take the Amazon gift card banner below. Do click on it and confirm for yourself that it opens in new window and hopefully purchase a nice gift card for your love ones (Important note especially if you are an AdSense publisher. Never encourage readers to click because it can get you kicked out from the AdSense program and you will have a very very very hard time to get it back (see how to restore banned AdSense account if that had happened to you. AdSense is CPC (Cost per Click) so doing that is considered click fraud. However, Amazon is CPA (cost per action) and the Amazon Affiliate gets nothing from people clicking their banner, only when that action resulted in a purchase that the affiliate gets a small commission, so for Amazon ads they don't have a policy banning you from encouraging readers to click their ads).

Anyway, here is the Amazon gift card banner which opens in new window:



Now to show how to do it. Here is the original Amazon iFrame code with the source (src) highlighted in red:

<iframe src="
http://rcm.amazon.com/e/cm?t=applesorangespears-20&o=1&p=12&l=ur1&category=gift_certificates&banner=127JF9E4530CSFRCY4R2&f=ifr" width="300" height="250" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>

Now all you need to do is to add <1=_new to the source URL with the above iFrame code thus modified to

<iframe src="
http://rcm.amazon.com/e/cm?t=bloggerfordum-20&o=1&p=12&l=ur1&category=gift_certificates&banner=127JF9E4530CSFRCY4R2&f=ifr<1=_new" width="300" height="250" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>

Now if you want the above banner centered like this instead of aligned left:



all you need to do is to surround the above code with <div style="text-align:center;"> and </div> with the above becoming

<div style="text-align:center;"><iframe src="
http://rcm.amazon.com/e/cm?t=bloggerfordum-20&o=1&p=12&l=ur1&category=gift_certificates&banner=127JF9E4530CSFRCY4R2&f=ifr<1=_new" width="300" height="250" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe><div>

Pretty simple right. Now for more Amazon banners, all opening in new windows:


21 comments:

  1. dear peter, help me to reverse the comment order on my blogspot, so the newest comment appear on top. Thnx

    ReplyDelete
  2. If you want that feature, you will probably have to use a Wordpress blog.

    ReplyDelete
  3. Well, thanks for the answer.
    the only thing that i can do is hoping blogger solving this problem.
    but still, i'll wait for your next tips, i hope next time you find the way to help me with this problem

    ReplyDelete
  4. Hi Peter, thank you very much!!!
    I like your blog!

    Regards from México =)

    ReplyDelete
  5. ups! but it din't work.... =(

    ReplyDelete
  6. Yes! It work! but using Plain Text, because I'm using Dreamweaver to edit my webpages, so:
    <1=_new (HTML)
    AND
    &lt1=_new (PLAIN TEXT)

    Is exactly the same...

    Thank you Peter!
    Regards from México =)

    ReplyDelete
  7. Didn't work? I would like to find out why. Send me the script you use via my contact form

    ReplyDelete
  8. Thanks so much! I'm using Drupal, and even with Full HTML input settings, I had to use the &lt1=_new that luisdelbar recommended. Otherwise, I had a document.write(" message come up in front of the banner. Thank you tremendously for this hint.

    ReplyDelete
  9. Dear Peter, Please help, I have a brand new blog and where my followers are (there are only about 4) instead of showing them, it is a cut off picture saying "server not found', and when I came to your site, it is also on yours where it says Followers. What is going on? Is there anything that can be done to fix it to see who and how many are the followers of my blog, www.jewelofbayshore.blogspot.com ? thanks very much in advance for your reply and help.Jesse

    ReplyDelete
  10. Thanks for the tip. I would used _blank instead of _new. IE picked up _new as a pop up.

    ReplyDelete
  11. Thanks for the feedback. Will check later and probably edit.

    ReplyDelete
  12. Thank you so much!

    ReplyDelete
  13. Thank you so much for the tips..Sooo much to learn.

    ReplyDelete
  14. nice tips, thanks for this i like it.. and it work with plain text

    ReplyDelete
  15. Hi Peter,

    Thanks to help us

    (Sorry I write very bad in English :) )

    I've got a similar problem like Fashion Belle

    " document.write(" "

    I've got not picture to !

    You can see here : http://acheter-bd-titeuf-pas-cher.blogspot.com/ the result !

    But It is better that before

    A big Thanks for help me and others

    ReplyDelete
  16. Can you tell me how long will my blog be reserved if I stop to use it for some time? Thanks.
    Mobile food cart

    ReplyDelete
  17. Hey, thanks a lot, Peter, for your blog! I'm new to the whole Amazon Associates thing, and this really helped me.

    SundSideUp.com

    ReplyDelete
    Replies
    1. Amazon is an amazingly maintained shopping cart and glad to know about the Amazon banner opening in new window. I am so much comfortable working with nopCommerce shopping cart though we have got many open source shoping cart

      Delete
  18. Many thanks Peter - you are a gentleman and a scholar (keep up the GREAT work)! Regards, Patrick

    ReplyDelete
  19. WTF? You have nested an opening tag "<" within a URL and unclosed tag. That is just nonsense and bad coding...

    <iframe src="http://rcm.amazon.com/e/cm?t=bloggerfordum-20&o=1&p=12&l=ur1&category=gift_certificates&banner=127JF9E4530CSFRCY4R2&f=ifr<1=_new"

    ReplyDelete
  20. This comment has been removed by a blog administrator.

    ReplyDelete

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics