homepage Welcome to WebmasterWorld Guest from 54.227.182.191
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

    
AdSense in external .js file
Are we allowed.....
Daily Sparring




msg:1432809
 12:07 am on Aug 17, 2004 (gmt 0)

I have read their TOS and have not read anywhere that says it cannot be done without violating the TOS. I searched high and low for answers with nothing. Are we allowed?

 

AdSenseAdvisor




msg:1432810
 12:19 am on Aug 17, 2004 (gmt 0)

The problem with including the AdSense code via an external .js is file is that the ad code will most likely require modification, which as you correctly noted is against our Terms and Conditions. Also, the ad code needs to be displayed in the HTML source of the page in order for our crawlers to index your content properly.

One option for you is to include the ad code via a server-side include (SSI). If done correctly, the ad code will show up in the HTML source of your pages as if it had been directly implemented.

Hope that helps!
ASA

btas2




msg:1432811
 1:50 am on Aug 17, 2004 (gmt 0)

Well, I've been using Adsense code from external .js files for quite a while. Though the javascript itself may not be "unmodified AdSense code", it inserts unmodified code into the page.

While AdSense have contacted me about a couple of other issues on the site (which I took care of right away to their satisfaction), I've never had a complaint about my serving the AdSense code via external .js files, so I'd assumed it wasn't a problem for them.

I've had no problems at all with the ads not being targeted to my content. On most pages the targeting is very accurate.

Unfortunately the host I'm with doesn't offer SSI, so .js files were the only way I could put the code on all my pages without hardcoding it into every page. That's fine, but makes making changes a bit of a pain!

If I'm violating AdSense TOS, I'd like to know for sure so I can try to keep within the rules!

btas2




msg:1432812
 2:46 am on Aug 17, 2004 (gmt 0)

But what actually constitutes "modification of the AdSense code"?

The code I'm serving IS the AsSense code. All the .js script does is serve it up line by line. The code supplied to your browser is EXACTLY the same code that AdSense provides from their web page. Your browser can't tell the difference, though of course the HTML source code for the page doesn't contain the AsSense code, it contains a call to the .js file containing the AdSense code.

I would maintain that I'm not modifying the AdSense code, I'm just not serving it directly from an html file. The TOS don't say you have to serve it directly from an HTML file as far as I'm aware.

If course if the OFFICIAL Google position is that this is totally prohibited and if they find me doing it I'll be booted off the program, then I'll get to work making modifications, but as I said, I've been running it that way for the best part of a year, Google have looked at my site and pointed out one area where I wasn't quite in compliance with their TOS (which I corrected), but they never commented on the use of .js files containg the AdSense code. I don't have it on ALL my pages, but I'd guess maybe 1/2 of them.

Perhaps I need to send (anonymous) email to them to ask for an offical ruling. I'd rather do it anonymously just in case they hadn't noticed it and get upset about it!

As I said, I seem to be getting perfectly targeted ads which are closely related to the content of each page. If there's some technical reason why Google need the AsSense code in "plain language" in the HTML source, then I hope someone can explain that to me. Of course Google don't have to since "rules is rules", and I accept that. I'd just like to know since it's going to be quite a bit of work for me to modify several hundred pages!

btas2




msg:1432813
 4:43 am on Aug 17, 2004 (gmt 0)

Well, it's Javascript, not Java, and clearly copying and pasting it is OK (what else would you be expected to do with it!).

I'm just wondering if Google does indeed need to see the actual Javascript on the HTML page. If it's served from a .js file, the same data goes to Google as it would if it were copied verbatim into the HTML source.

The only difference would be when Google crawled the page, but does the regular Google crawl have anything to do with Adsense? If Google is using it's regular crawl data to decide which ads to serve for a particular page, I'm not sure why it would need to see the explict Javascript source on the page.

When the call is made to Adsense to download the ads, I presume it knows which page it's coming from and the call transfers exactly the same data as it would if the Javascript was placed directly on the page. If Google has crawled the page, it knows what's there in terms of content and so it knows which ads to serve. None of the data sent by the AdSense Javascript identifies the page it's included on. It just sends account ID and Ad formating information whether it's loaded from a .js file or sits directly on the page. The page ID is sent in the headers I assume and isn't related to the actual Javacript data.

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