Industry guru Dave Taylor answers free tech support questions about a wide variety of business and technical topics, including blogging, Google AdSense, MySpace, Sony PSP, Apple iPod, Mp3 players, management, Linux, SEO, Mac OS X, Facebook, Twitter, LinkedIn and Microsoft Windows.

How can I have Google AdSense ads open in a new window?

Hi I need to know how to change the target of the Google AdSense ads via script. I changed the background by using: google_color_bg = "E5EBF2"; but now I need to change the target of the hyperlinks to open in a new window. can you please help.


Dave's Answer:

It's always a bit of a dilemma when I get this sort of question because I know that there are ways to tweak your AdSense block to change its behavior, including having the ads open in a new window, but I'm also very aware of the AdSense Terms of Service, which states:

"You agree to comply with the specifications provided by Google from time to time to enable proper delivery, display, tracking, and reporting of Ads, Links, Search Results, Referral Buttons, and Google Brand Features (as defined in Section 12 below) in connection with Your Site(s), including without limitation by not modifying the JavaScript or other programming provided to You by Google in any way, unless expressly authorized in writing by Google (including by electronic mail)."

The key phrase here is by not modifying the JavaScript or programming provided to You by Google.

Doesn't sound to me like it's okay for people to be hacking and tweaking their AdSense beyond the range of modifications to appearance that are expressly authorized by the company. On the one hand I know people who are frustrated by this limitation, but on the other hand, it's their ad network, so if you really don't like the terms and conditions, well, there are alternatives.

Still not entirely sure that I'm correct? Consider this Q&A from Google entitled Can I open the ads in a new window? in which it says quite explicitly:

"Keeping in mind the importance of the user experience, we generally have not allowed Google ads to open in a new window. However, in a few markets, including China, we've found that opening ads in a new window better aligns with expected internet behavior and provides a more consistent, intuitive user experience. After significant testing, we've enabled Google ads to open in new windows in locations where this is expected browsing behavior. This functionality is determined by the IP of the user, and is not an option you can select your AdSense account.

"We also ask that you don't modify the AdSense ad code or alter the result of clicking on an ad on your website, as such behavior violates our program policies."

That's a very polite way of saying no, and don't monkey with it, pal!

Having said all of that, it's also likely true that if you dig deep enough you can find some sort of tips from hackers about how to tweak the behavior of your AdSense block anyway. Just don't be surprised if you get a notice from Google one day that you've been kicked out of the program for violations of their terms and conditions.



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

http://www.dynamicdrive.com/dynamicindex8/newwindow2.htm

If you do exactly what is said there, your problems will be solved.

Posted by: Darren at April 17, 2008 9:38 AM

WARNING: While the link Darren provides might offer up the ability to have your AdSense ads open up in a new browser window, be aware that this is a VIOLATION OF THE TERMS OF SERVICE and once Google notices, you'll probably be kicked out of the system.

Visit that link, and any others that offer to tweak or modify the AdSense code, at your own risk.

Posted by: Dave Taylor at April 17, 2008 11:32 AM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2008 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]