No, that's fine. You haven't changed the code and are just making it easier for yourself if/when Google alter the code.
As Mark said. I use server side includes myself, but the principle is the same.
Just do yourself a favour, and use standard HTML instead:
There's no "language" attribute to the script tag in standard HTML.
>server side includes ... the principle is the same.
Hmmm...This is interesting. I don't think that people are having trouble using this method. I would also like to know what peoples experiences are.
I use a Frontpage include to include the Google script into the page and don't get any problems, either with Google or with the targetting of the adverts.
I think the big question is whether the ad code shows up in the HTML of the page or not. With a PHP include and with SSI, it does. As a user visiting the page, you can't tell that it was included - it's simply on the page. With the ad code is NOT in the HTML code of the site. As was mentioned above, I don't know if that really matters or not.
I think Yidaki raises some excellent points. I haven't seen any .js files that are used to call the AdSense file, and there is probably a reason for this.
I think your best bet is to ask Google directly and see what they say on the subject. They are usually very prompt in replying.
Let us know once you hear back from Google on this, as I am sure there are many who are interested in an official word from Google on using .js to call the AdSense code.
if you have php or some other scripting language, you can always put the adsense code into an external file, then include() the file. It would appear to be within your html document from the website, but would be in a seperate file.
I contacted Adsense Support and still waiting for their reply.
>I contacted Adsense Support and still waiting for their reply.
hehehe, when? Waiting since four hours now and still no reply! I bet we'll know it by tomorrow. ;)
An email from their support.
Thank you for your email. Placing the AdSense code within a .js file is acceptable so long as there is no alteration of the AdSense code itself.
We realize that this makes the AdSense code much easier to maintain across an entire website.
>external js is acceptable
Yep, received the this morning same reply. Additionally they told me to use adsense-tech [at] google.com for tech questions and adsense-support [at] google.com for all other questions. The first email adress is new to me.
All in all: great support Google!