homepage Welcome to WebmasterWorld Guest from 54.166.148.189
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

    
AdSense and includes
putting AdSense code into php include
Tastatura




msg:1408540
 8:08 am on Feb 10, 2006 (gmt 0)

Hi all,
(I just joined the forum) I am considering putting AdSense on my website, and since the site is brand new, I would like to experiment with different layouts, both page layouts and AdSense positioning. I am thinking of putting AdSense code into php include, and then just calling it from the pages. Basically the idea is to easily and quickly change location of the AdSense adds on all pages (rather then manually editing each page). Since I have no experience with AdSense, I was wondering if there is a potentially issues with this (e.x. not being served relevant ads, etc).
If this has been answered, or this is the wrong forum, please point me in the right direction.
Thanks

 

jetteroheller




msg:1408541
 8:24 am on Feb 10, 2006 (gmt 0)

When somewhere in the php is the original AdSense code stored, no problem.

MyGen




msg:1408542
 8:34 am on Feb 10, 2006 (gmt 0)

Because everything is parsed on the server, before google gets its hands on your content, including your ads using PHP will have absolutely no effect on thier relevancy.

toomuch72




msg:1408543
 9:41 am on Feb 10, 2006 (gmt 0)

The problem with Include commands is you are calling the code from a different page/file all together. this gets iffy in the TOS.

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.

leveldisc




msg:1408544
 10:05 am on Feb 10, 2006 (gmt 0)

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.

aris1970




msg:1408545
 10:38 am on Feb 10, 2006 (gmt 0)

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.

marcel




msg:1408546
 12:27 pm on Feb 10, 2006 (gmt 0)

Just make sure that you're not showing the code on non-content pages such as:

- Error pages
- login pages
- thank you pages etc.

And you should be fine

(I think that this is what toomuch72 was referring to)

StuntasticAudi




msg:1408547
 2:51 pm on Feb 10, 2006 (gmt 0)

I dont think it matters that it's put on an empty content page in this situation. include.php does not display as an empty page in the browser. It's just part of the php coding. I have a link.php, header.php, footer.php...all are part of putting php pages together. I think you should be fine.

frox




msg:1408548
 2:52 pm on Feb 10, 2006 (gmt 0)

I think toomuch72 was speaking of such a situation

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?

StuntasticAudi




msg:1408549
 3:01 pm on Feb 10, 2006 (gmt 0)

In this situation it might be against TOS.

But if you have your index.php, header.php, footer.php, template.php...etc then you ad ads.php thats just blank with ads it will all come together into the site and that's fine.

JollyK




msg:1408550
 3:46 pm on Feb 10, 2006 (gmt 0)

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

marcel




msg:1408551
 4:16 pm on Feb 10, 2006 (gmt 0)

Sorry, I wasn't very clear.

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved