Forum Moderators: open

Message Too Old, No Replies

Google Adsense Split-Testing with Javascript

Looking for some kind of solution to implement this

         

ConfusedWriter

7:25 pm on Feb 17, 2006 (gmt 0)

10+ Year Member



Alright. I posted something similar in sitepoint's forum to see if I could figure out a solution to the following problem:

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!

whoisgregg

11:05 pm on Feb 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Been a while, but...

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.