Forum Moderators: martinibuster

Message Too Old, No Replies

How to alternate different adsense ads automatically?

         

dzcap

6:11 pm on Nov 14, 2005 (gmt 0)

10+ Year Member



Lets say I want visitor #1 to see ad with red border, and visitor #2 to see ad with blue border. What's the code to do this?

perldiver

6:19 pm on Nov 14, 2005 (gmt 0)



This is actually very simple, as was pointed out to me recently.

On the adsense code creation screen you can set up different ad palettes. Here you would set one up with a blue border and another with a red border. Then on the place where you select which palette to use with your ad code, you can select more than one at the same time by pressing CTRL while selecting the palette options.

You can select up to 4, and when G displays the ad, it will show one of the ones you chose at random.

dzcap

6:35 pm on Nov 14, 2005 (gmt 0)

10+ Year Member



Neat! What about changing ad sizes automatically?

perldiver

7:00 pm on Nov 14, 2005 (gmt 0)



For that you'd have to be generating the site dynamically somehow, with perl, java or php...

That would allow you to have more than one ad code block and programmatically chose between them at page generation time.