Forum Moderators: martinibuster

Message Too Old, No Replies

Temporarily AdSense switching off / on for whole website

         

optimierung

3:43 pm on Oct 17, 2006 (gmt 0)

10+ Year Member



Hi
For checking the visitors behaviour I want to switch off/on for a certain time period the presentation of all ads on my whole website (some 100s pages with ads) without eliminating the code or uploading different pages: how can I do this in form of some "single command" or something else?
Thanks in advance

optimierung

8:18 am on Oct 22, 2006 (gmt 0)

10+ Year Member



It is crazy if you consider the work to be done not being allowed using search & replace (e.g. my replacement src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> replaced by <!-- adsense //--> and vice versa)

But using SSI or similar you must also be cautious not changing their code by editing the file(s).

I understod their answer: "Do not change the code" means "always use the AdSense Interface to change it".

Bddmed

8:27 am on Oct 22, 2006 (gmt 0)

10+ Year Member



Optimierung,

When your AdSense code is within a SSI, you just delete the complete AdSense code within that file and the change you made is site-wide instantly. When you want your ads back on you only have to change one file.

For myself I use three SSI files. Two for different ad placements. One for no ads at all on the page. This way to wipe out the ads, in my case, I have to edit two files.

optimierung

9:39 am on Oct 22, 2006 (gmt 0)

10+ Year Member



Bddmed

What I tried to make clear: If you embed their code in some kind of external files you always must generate modifications of that code using the AS interface. Otherwise you neglect their TOS.

Bddmed

9:43 am on Oct 22, 2006 (gmt 0)

10+ Year Member



Absolutely true. Point taken ;)

level80

2:10 pm on Oct 23, 2006 (gmt 0)

10+ Year Member



Well I got a reply back from Adsense. They basically said frames ok, iframes not (layout, behaviour, delivery issues) and that even with frames it would be important to put the adsense block in the same frame as the content otherwise targeting would be screwed up.

bumpski

3:29 pm on Oct 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you take a look at any new code Google is now embedding a date, and text indications of your channels which is nice.

Sample extract code:
google_ad_type = "text";
//2006-10-23: WHHHD
google_ad_channel =

Now that they embed the date in the code, than can also archive the code generated and detect any change anyone makes. I'm surprised they didn't add a time too! I just noted that apparently they are only embedding the date if you use channels.

IFrames used to work well, and still are working for some! I used to have the Adsense code first thing in the page before all content in an IFrame, this did work till about a year ago, then it went haywire with bad targeting, but I suspect if the IFrame and code are after the content IFrames may still work. The TOS did not specifically say no IFrames it just says you may have problems with them. In fact at the time I was having troubles AdsenseAdvisor wrote me and offered to help debug! But I had to tell him I couldn't afford the lack of income due to bad targeting and had already pulled the IFrame.

The IFrames were great because they got rid of all Adsense server delays, delays which prevent page rendering on some browsers even with careful coding. Fetching the Adsense Javascript itself can be a big delay, but fortunately it's often already in the browsers cache. Probably the most copied piece of javascript in the world!

This 36 message thread spans 2 pages: 36