Welcome to WebmasterWorld Guest from 18.104.22.168
Im trying to put the code in my other site and want to use the following code:
This is filename like: google.js
google_ad_client = "pub-8873314380043948";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
I will just insert the code in my webpages like this:
I would like to know if this is just fine or it is against in adsense policy.
Just do yourself a favour, and use standard HTML instead:
There's no "language" attribute to the script tag in standard HTML.
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.
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.
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!