View Full Version : adSense color rotator
lonecrow
May 20th 2005, 8:29 pm
I have posted an ASP color rotator that will rotate through all 28 of G's predefined color schemes. Not genius level programming but maybe someone will find it useful.
You can easily add new color schemes and convert it to whatever scripting language you use.
adSense Color Rotator (http://www.lonecrow.net/ascolor.asp)
Cheers
fryman
May 20th 2005, 8:30 pm
I don't think Google would like to see people playing around with their ads like that.
They offer to rotate the ads with 3 different colors, anything over that may violate their TOS
AzAkers
May 20th 2005, 8:57 pm
Funny Digital Point employs some sort of color rotation script.
Juts refresh your browser a bout 5-6 time...notice you get 4,5,6,7 different color schemes...? I'd saw Shawn already implemented something like this.
Tuning
May 20th 2005, 9:42 pm
Funny Digital Point employs some sort of color rotation script.
Juts refresh your browser a bout 5-6 time...notice you get 4,5,6,7 different color schemes...? I'd saw Shawn already implemented something like this.
I think its simple using a php script with full adcode. Note that here fulladcode implies full adsense code that you get from adsense cp.
<?php
$code=rand(1,X);
switch ($code)
{
case 1:
print "full adcode1";
break;
case 2:
print "full adcode2";
break;
case 3:
print "full adcode3";
break;
.
.
.
.
.
.
.
.
.
.
case X :
print "full adcodeX";
break;
}
?>
I think using full adcode won't violate TOS
Imran
May 21st 2005, 6:05 am
I think its simple using a php script with full adcode. Note that here fulladcode implies full adsense code that you get from adsense cp.
<?php
$code=rand(1,X);
switch ($code)
{
case 1:
print "full adcode1";
break;
case 2:
print "full adcode2";
break;
case 3:
print "full adcode3";
break;
.
.
.
.
.
.
.
.
.
.
case X :
print "full adcodeX";
break;
}
?>
I think using full adcode won't violate TOS
I tried your script, but its not working.
pcdoc
May 21st 2005, 6:33 am
ASP color rotator that will rotate through all 28 of G's predefined color schemes.
But what about
2- I create custom palette for my ads. I choose white as the color for the border and background. This is because, all of my pages have white background. The idea is to make the AdSense ads look like they are a part of my web pages.
from here (http://www.createonlinebusiness.com/adsense_tip48.htm)
seems to make (Ad)sense to me.
Imran
May 21st 2005, 6:38 am
In a adsense.txt
put all the google ads separated by '~' without quotes as a delimiter! Thats it
and put the below code into your php file, remember the path for adsense.txt must be correct.
//opening the text file, if this line gives you error when compiling
//the code then you need to chmod 755 your text file
$fcontents = join ('', file ('adsense.txt'));
//Spliting contents of file by looking for ~ mark between codes
//and storing everything into an array.
$s_con = split("~",$fcontents);
//getting a random number which will be within the limit of the
//contents of the file, means if 5 different banners/ads then the number
//will be between 0-4 (total 5 )
$banner_no = (rand()%(count($s_con)-1));
//simple scho banner
echo $s_con[$banner_no];
you can see the example of this @
http://winkeyfinder.com/imran
FreeFox
May 21st 2005, 7:17 am
Nice tread!
minstrel
May 21st 2005, 7:25 am
Nice tread!
Thanks, FF... those are new Bridgestones :D
honey
May 21st 2005, 1:09 pm
Looks good to me, I will try it. Thanks.
tbarr60
May 21st 2005, 1:42 pm
I went away from rotating colors to matching the color scheme of my site a while back. I think I got about a 50% improvement in CTR. Rotating the colors seemed to make the ads stand out as ads whereas blending into the site makes the visitor more likely to read the ads like other copy on the site and click on the ad links.
If you could write a script that reports back which colors work that would be good.
Gede
May 21st 2005, 4:32 pm
Ok.
Create an x number of color combinations, and for this same number create so many channels.
Put all the combinations in an array, sit back for a week or what and see what channel does best.
And here is your PHP script that displays ads with random different combinations:
Name your channels something like blue_ad, green_ad, blended_ad etc...
Here there are just 3 combinations, but it can be much more of course
<?
$col_bor[1][1]="1234567890" ; // channel
$col_bor[1][2]="FFFFFF" ; // color border;
$col_bor[1][3]="FFFFFF" ; // color background;
$col_bor[1][4]="000000" ; // color link
$col_bor[1][5]="333333" ; // color url
$col_bor[1][6]="555555" ; // color text
$col_bor[2][1]="1234567890" ;
$col_bor[2][2]="000000" ;
$col_bor[2][3]="000000" ;
$col_bor[2][4]="501090" ;
$col_bor[2][5]="232323" ;
$col_bor[2][6]="808000" ;
$col_bor[3][1]="1234567890" ;
$col_bor[3][2]="602378" ;
$col_bor[3][3]="451267" ;
$col_bor[3][4]="121212" ;
$col_bor[3][5]="008000" ;
$col_bor[3][6]="800030" ;
$the_nr=rand(1,3); // change the 3 to how many combinations your have created above
?>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxx";
google_alternate_ad_url = "";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="<? print $col_bor[$the_nr][1] ; ?>";
google_color_border = "<? print $col_bor[$the_nr][2] ; ?>";
google_color_bg = "<? print $col_bor[$the_nr][3] ; ?>";
google_color_link = "<? print $col_bor[$the_nr][4] ; ?>";
google_color_url = "<? print $col_bor[$the_nr][5] ; ?>";
google_color_text = "<? print $col_bor[$the_nr][6] ; ?>";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
:)
Tuning
May 21st 2005, 9:01 pm
I tried your script, but its not working.
Sorry forgot to tell you that you have to replace all " with \"
Regards,
Tuning
lonecrow
May 22nd 2005, 1:16 am
I don't think Google would like to see people playing around with their ads like that.
They offer to rotate the ads with 3 different colors, anything over that may violate their TOS
I don't think they care about the server side stuff and I am not modifying the client side code at all.
I'm not doing this: xxx_color="[ffffff,000000,ffffff,000000,ffffff,000000,ffffff];"
Their script will take a single color or an array of 4 colors. I am only setting a single color but doing it dynamically.
But thanks, If someone thinks I'm treading the line I wanna hear about it. My AS account is too important to fool around with.
Gede
May 22nd 2005, 1:37 am
I don't think there is an objection to dynamicly change colors...
But :
Web pages may not include incentives of any kind for users to click on ads. This includes encouraging users to click on the ads or to visit the advertisers' sites as well as drawing any undue attention to the ads
Undue attention...
Suppose my page is kinda greyish, and the google link is purple, or red, would that be a reason to warn me, or cancel my account???
I just have a color rotation working on my (greyish) forum.
http://www.vierstra.com/forum/
Imran
May 22nd 2005, 3:02 am
I dont think so, what google does'nt wanna see is, webmaster's asking visitors to click on ads. After all we are just using same color codes given by Google, thing is that load a different one each time a page loads.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.