Forum Moderators: martinibuster

Message Too Old, No Replies

Adjusting Google Adsense code

May I change e.g. the google_ad_width value?

         

konrad

7:41 am on Aug 29, 2009 (gmt 0)

10+ Year Member



When I have a code like:


<script type="text/javascript"><!--
google_ad_client = "pub-something";
/* 120x240 */
google_ad_slot = "something";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script>

May I change the google_ad_width & google_ad_height values? I tried but it doesn't work, or maybe I should wait?

And by the way - is it possible to tell this script to make the background transparent?

rajivatre

8:15 am on Aug 29, 2009 (gmt 0)

10+ Year Member



i dont think you are allowed to change the adsense code in any way as per the adsense TOS. except for the A/B testing mentioned in adsense blogs.

konrad

8:29 am on Aug 29, 2009 (gmt 0)

10+ Year Member



ok... But that's strange, none of the adsense templates matches my website's layout :(

Nevermind, thanks for the answer.

HuskyPup

8:36 am on Aug 29, 2009 (gmt 0)



Transparent backgrounds have been requested by publishers and are under consideration I believe.

You cannot change width and height values to something they do not have as standard.

konrad

8:39 am on Aug 29, 2009 (gmt 0)

10+ Year Member



OK :(

HuskyPup

8:40 am on Aug 29, 2009 (gmt 0)



If you want a non-standard width and height why not create a box/rectangle to your size, find the most appropriate ad and insert it with your matching colour background with no border?

Not only does it look good for me it also happens to have the best CTR.

marcel

8:49 am on Aug 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want a non-standard width and height why not create a box/rectangle to your size, find the most appropriate ad and insert it with your matching colour background with no border?

That's also what I do, with little effort you can make some great looking/blended ad units.

konrad

8:50 am on Aug 29, 2009 (gmt 0)

10+ Year Member



What do you mean by "find the most appropriate ad"? You mean the most appropriate ad format?

I have a div with width: 200px and Adsense inside, now I want the adsense to "spread" to this width. Currently it shows up in 120px.

koan

10:33 am on Aug 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can only modify the code by creating other ads using the ad manager section of Adsense and copy paste the code that is generated. If you want a "transparent" background, just choose the same color for the ad as your page background. Spend some time exploring and reading their help pages to get the basics first.

konrad

10:41 am on Aug 29, 2009 (gmt 0)

10+ Year Member



thanks Koan,

the problem is that I use an image as a background, that's because I was asking about transparent backgrounds in adsense.

But OK, thank you all for your answers, I can see I can't do what I want.

koan

12:07 pm on Aug 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well, you can remove your image and use a plain background instead so that it matches Adsense, which would be highly recommended if the ad is in the content area of your pages (text should be over white, ideally, or plain, neutral colors). If you're trying to position the ad over design elements, that's another story. You'll probably need to do some redesign. It comes with experience, next site you'll keep the ads positioning in mind when you design it ;)

konrad

12:24 pm on Aug 29, 2009 (gmt 0)

10+ Year Member



OK, thanks.