Forum Moderators: martinibuster

Message Too Old, No Replies

Multiple Ad Code Question

adsense, multiple ads, code

         

pmmenneg

9:14 pm on Mar 10, 2009 (gmt 0)

10+ Year Member



So, just trying to place a second ad on a page already showing a single adsense ad.

After each script block that defines the ad channel, do I need to include the show_ads.js script block, or can I just include this one at the bottom of the page?

No matter what I try, the second ad is just showing up blank.

Thanks!

fredw

11:10 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is never within the Adsense TOS (Terms of Service) to modify the Adsense code in any way.

So, just paste it as you get it. If that means the script includes some .js file twice, that's what it means.

If you're including your Adsense code WITHOUT CHANGE twice and the second ad is still not working, let us know.

Note: New ad units will show blank initially, it takes a while for them to become active after being created. It could take a few minutes to a few hours in some cases.

pmmenneg

12:14 am on Mar 11, 2009 (gmt 0)

10+ Year Member



Figured out the problem, but don't know the solution...

I posted the adsensecode exactly as output by adsennse, so the show_ads.js script tag is included twice.

In firefox I get this error in the error console...

v[q].toLowerCase is not a function

And it points to show_ads.js.

This error does not show up if I only have one ad per page and one inclusion of the show_ads.js file directly below the first ad.

Any ideas?

Thanks!

pmmenneg

9:58 pm on Mar 11, 2009 (gmt 0)

10+ Year Member



OK, figured it out. My first section of ad code was missing a few quotes.

I had the following on my first ad:

google_ad_slot = 14352345234;

And the code from google on my second had:

google_ad_slot = "14352345234";

While the missing quotes allowed the first ad to load fine, no subsequent ads would load. Adding the neccessary quotes around the first google_ad_slot var resulted in the expected results, two ads being displayed, no .js errors...

Thanks!