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.
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.
This is very nice, full information that i was looking for you always have to check because google is very strict now a days
I dont neccessarily want goggle adds to open in a new page, just open instead of hanging would be nice. Google adds and ewebber adds just bhang on a white page, any suggestions (down on my knees)please.
very,.,.very nice article..
the comments over here did help me for getting good knowledge about adsense troubleshooting!
Google should leave this option to website owner whether they want to open in new window or not. it cannot force site owners to open ads in same page. I think switching to other PPC program is much better.
Tomer,
Thats awesome, lol.
Google should kick Gmail out of its program.
Funny how Gmail ads open in a new window, isn’t it?
Dave,
We are configuring our account with Google Ad Manager and it allows us to put the code from all Ad networks with the option to open in a new window, this would not be editing the code at all but we wanted to know if this is within their terms of service. We want to abide by their terms so we need to make 100% sure before we proceed. I did email Google but no reply yet.
Lou, I asked my contact inside the Google AdSense team and here’s what he sent back:
I don’t have much more information than you’ve already provided. The AdSense Help Center provides the same information that you’ve given:
https://www.google.com/adsense/support/bin/answer.py?hl=en&answer=9737
Of particular note is the final line in the Help Center entry. As stated, altering “the result of clicking on an ad” is a violation of the AdSense program policies.
Modifying Google’s Javascript to make ads open in a new window is a clear violation. However, what is not as clear is whether it is a violation to open a content-based page that *contains* Google ads in a new window, *from* a page that contains ads. For example, if you had links to help pages and wanted those pages to come up in a new window, and those help pages has Google ads on them, would creating links that automatically opened in a new window be a violation of the TOS? I don’t think that it would violate the TOS, but the language on this page (https://www.google.com/adsense/support/bin/answer.py?answer=9737) is somewhat ambiguous: “Generally, it is our policy to not allow Google ads to open in a new window.” I think they mean “open” as in “go to the advertiser’s Web site,” but they *could* mean “open” as in “display the ad itself.” So, it would be helpful if you could disambiguate this here (even better if Google did that).
Note that if the user wants the ad to open in a new window or tab, the user can choose to click right on the link and then select the appropriate option. Google does not prevent that. So, if the use wants to keep your content open but also wishes to view the ad, the user has that option, even though the default click behavior is to take the user away from your content.
thanks alot for putting up the info, it helped me to clear few info about google ads for my games website.
I think now its possible if you use Google Ad Manager.
Check out http://www.codeitwell.com/how-to-open-adsense-in-new-window-safely.html
Quote: “…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.”
Does anybody know anything about these IP limitations? Are they country based? I’ve tried finding some sites about this topic, but can’t seem to find anything. If you know, please hit me back on the 8 track. Thanks in advance for any help! 🙂
Alex @ Gone-surfing.com
I have this code in my oscommerce’ html banner config in the admin area. Is this considered a violation in the Google’s Terms & Condition?
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.
http://www.dynamicdrive.com/dynamicindex8/newwindow2.htm
If you do exactly what is said there, your problems will be solved.