Forum Moderators: martinibuster
The TOS clearly states that No Google ad may be placed on any non-content-based pages. Since the code itself is placed on a non content based paged and just INCLUDED on the content page it could really cause some problems?
I use variables and include it on the code of the page I'm showing. Example below. That way there will be no issue.
<? if ($showad=='true'){?>adsense code<?}?>
Overall the spirit of the policies is intact when you use include(but the actually letter of the policy may not be) and a quick e-mail to Google may confirm if this is ok or not.
Mygen is correct--about the final parse. I have no clue if they could even find out that you are using include in your code without access to the actual php file that you uploaded to your server.
The problem with Include commands is you are calling the code from a different page/file all together. this gets iffy in the TOS.
By all means check with google, but I can't believe this is the case. Are you really claiming that having the google code in an include file is against the TOS?
I don't think google care how a page is built as long as what is served up is within the TOS.
The problem with Include commands is you are calling the code from a different page/file all together. this gets iffy in the TOS.
There is absolutely NO PROBLEM when using Adsense through php include. TOS refer to what the end user views and NOT to the code that serves the content. We are using php include to show Adsense on our websites for the last 2 years and we never had any problems.
widgets.php
==============================
<? include 'ads.php'; >?
This is my page about widgets.
It has a lot of contents.
==============================
So, when you go to www.example.com/widgets.php,
You see the page with its contents and the ads.
But if you DIRECTLY go to www.example.com/ads.php
then you will only see the ads, without contents...
But then again, who will ever even know the address of your ads.php page?
By all means check with google, but I can't believe this is the case. Are you really claiming that having the google code in an include file is against the TOS?
Um ... not to be odd-man-out here, but Google DID contact me about my include file stating that ads had to be on a content page and that having a file with just the Adsense code was a violation of the TOS. Of course, the include file wasn't linked anywhere, but I did view it by itself to make sure it was working before inserting it into pages (no, I didn't click), at which point, I think the mediabot spidered it and it came to someone's attention.
When I explained that I was just testing it, was going to use it as an include, and that I had no intention of just displaying it by itself, they were sort of okay with that, but I imagine they'd have made more noise if the include page started being viewed by itself.
It is also possible Google has changed its mind about this since then, but I figured I'd at least mention it. :-)
JK
When you use an include (footer or header with adsense code) on ALL your pages it may also be displayed on pages with no real content such as login or thank you pages.
There are many forums with adsense in the headers or footers which show on all pages, login, login error, thank you etc etc.
AFAIK this is against TOS.