Forum Moderators: martinibuster
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";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
//-->
I will just insert the code in my webpages like this:
<SCRIPT LANGUAGE="javascript" SRC="google.js"></SCRIPT>
I would like to know if this is just fine or it is against in adsense policy.
Off topic:
<SCRIPT LANGUAGE="javascript" SRC="google.js"></SCRIPT>
Just do yourself a favour, and use standard HTML instead:
<script type="text/javascript" src="google.js"></script> There's no "language" attribute to the script tag in standard HTML.
Don't want to sound like a smart alec but there's a significant difference: JavaScript is executed on the client side (even external js) but ssi is executed on server side. So if mediabot visits a page that includes the adsense code using ssi, it gets the js code. But if it visits a page that uses external js it probably won't get it - mediabot probably doesn't fetch js (?). Don't know if its important for mediabot to see the actual AdSense code at the requested page - one never knows ... maybe it reads the id token to do checks or something!? I also would like to make the code external (like i do with amazon and others) but i gonna ask google before ...
Mickey
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.
[google.com...]
With javascript files (ie. google.js), the code doesn't appear on the page, while it does appear when using an SSI, which is probably where the problem is.
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.