Forum Moderators: open
I want to integrate split-testing (using Google Adsense) in my blog using Javascript. In the simplest terms, all I want to do is test one color ad against another randomly between visitors.
This blog is hosted using Six Apart's Typepad solution (which doesn't provide PHP support).
I've tried everything under the sun to try and accomplish this (while staying with Google's Terms of Service) but can't.
Is there a way that I can dynamically insert Adsense code on an HTML page, as it loads? The only option that I can think of is to use "document.write" but I'm not sure Google might be too happy about that.
Also, is it possible to use PHP code remotely (as a workaround)?
Any ideas/help would be greatly appreciated!
They say to test colors/placement/etc. using channels:
[google.com...]
And, it's not against the TOS to choose when to serve any particular ad code -- it's just against the TOS to modify that ad code. So using javascript to manipulate the code would be bad. However, you can set up PHP (, SSI, or whatever your backend is) to rotate different ad blocks with different settings and different channels.