Welcome to WebmasterWorld Guest from 54.198.74.197

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

Adsense in external .js file?

Simple question, is that allowed

     
5:43 pm on May 1, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 15, 2002
posts:172
votes: 0


Please excuse this rookie question.

Is it OK to put the Adsense javascript code in an external javascript file, or must the code appear directly within the html file that uses it.

8:23 pm on May 1, 2004 (gmt 0)

New User

10+ Year Member

joined:Aug 5, 2003
posts:25
votes: 0


I have one javascript file that apply adsense code to all site pages, and impressions and click are regularly registered.
6:03 am on May 2, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Jan 15, 2004
posts:274
votes: 0


No it is not allowed. I have asked them.
8:25 am on May 2, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 7, 2003
posts:408
votes: 0


There's another thread about Adsense in an external javascript:

[webmasterworld.com...]

Reply from the Google Adsense team: "code cannot be altered in any way"...

7:16 pm on May 2, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 29, 2004
posts:180
votes: 0


Can we use SSIs or PHP to serve different ads from the same pages? I mean, does Google care if a given page serves different ads each time it's visited? The ads would change, but all would come from a stock "written" by Google, with no changes inside the scripts.

Possible uses: (1) serve different colors or sizes to reduce ad-blindness, (2) serve different channels, tracking anything knowable—hour of day, member status, (3) tie differences in aesthetics to channels, to track the most effective colors, sizes, etc.

I asked this question here once before, but got no replies. Google misunderstood my question and sent me a form letter about how to insert JS into webpages.

7:19 pm on May 2, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 9, 2003
posts:815
votes: 0


I have my adsense code in a SSI file, this does not alter the code in any way and I can change all the ads with the switch of one file.
7:43 pm on May 2, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jomaxx is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 6, 2002
posts:4768
votes: 0


Some of those changes will trigger a reindexing of the page by AdSense (specifically ad sizes; not sure about color changes or channel changes).

I don't see why you couldn't swap AdSense in and out using PHP or SSI, but I would be careful about constantly changing the ad format. You might conceivably get some bizarre side effects, such as excessive spidering, poor targeting, or frequent manual checks from Google staff.

6:18 pm on May 6, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 15, 2002
posts:172
votes: 0


Thanks Tombolo, for posting that link to the previous thread on this topic, and thanks to the others who replied too. The first post in that previous thread, had the most desirable way to do Adsense as an external javascript file. Too bad the official word so far, is that its not allowed. So, wouldn't it be nice if..

Google, most esteemed AdsenseAdvisor,
Could you please add a little code into your algorithm that checks if pages are using un-adulterated Adsense code... to add the option to use a specific external javascript file, which is restricted to containing ONLY the 12 required lines to set the Google_variables values.? Your checking algorithm should be able to figure that out, and it would make format changes to large sites, sooo much easier.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members