|Adsense in external .js file?|
Simple question, is that allowed
Please excuse this rookie question.
No it is not allowed. I have asked them.
Reply from the Google Adsense team: "code cannot be altered in any way"...
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.
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.
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.
Google, most esteemed AdsenseAdvisor,