wiley / madgex-lazy-ads

Deliver synchronous ads asynchronously, without modifying the ad code. Also, conditionally load ads for responsive websites using a media query or the ad container's dimensions.
MIT License
656 stars 42 forks source link

lazy-ads not working with multiple Google AdSense placeholders of same format, Solution? #16

Open baszero opened 9 years ago

baszero commented 9 years ago

When you have three placeholders of Google AdSense, the ad snippet you place there from Google is always the same. However, if you wrap each of those snippets into a lazy-ad, only the first one executes...

In the console, I get these errors: Uncaught TypeError: Cannot read property '1' of null (anonymous function)

it is a resource that gets loaded from http://googleads.g.doubleclick.net/pagead/adview?ai=C5Z9jY9YnVfehDerx7QaIvY…6sq_AQcZfTwpN0SRatdIWXmV0WUgAb_vM3Rpdegx8QBoAYh2AcA&sigh=7Ec_ESyXWa0&vis=1

Anyone having used lazy-ads with multiple AdSense placeholders of same format (e.g. three times 300x250) ?

baszero commented 9 years ago

Nobody with some experience with this? I heard now that lazy-ads caches the output and it might be the case that this is the reason why only one placeholder gets processed...

I think this is a bug in lazy-ads

kristian-b commented 9 years ago

I use only one Google AdSense slot and this works. Sorry I can't help.

baszero commented 9 years ago

Ok, but it would be fair to mention it somehow on the front page documentation that is has been tested well for one placeholder only and not for multiple placeholders of the same format (e.g. three placesholders for 300x250).

baszero commented 9 years ago

Question: is lazy-ads using a local cache somehow? If so, what is the "key" for the cache? I'd like to dig into this and resolve it.

cbarnsdale commented 9 years ago

I'm late to the party, but I'm having a similar issue with another network. If I have multiple placements of the same format, 1/2 of them render at the bottom of the browser.

cbarnsdale commented 9 years ago

Any updates on this? Using multiple instances of the same advertising tags, i.e: two copies of a 300x250 ad unit, results in some of the ad units being displayed in the footer region of my website. I can reproduce this over and over.