One some pages only 1 of 3 ads is showing. When I examine the source code I see <!--adsense: ad limit reached for type-->. However, the limit hasn't been reached. I'm using blocks and php to "inject" ads into content based on content type - could that be causing an issue with the counter?

Comments

jcnventura’s picture

Something must be calling that inject code multiple times. Other modules calling node_load() can increase the counter, even though in the end you're below the limit.

I think the ad counter may be introducing more problems than it solves, with all the possible third-party modules.

WeRockYourWeb.com’s picture

Thanks for the quick feedback. From what I can tell the right number of ads are being injected, so maybe it does have to do with node_load() being called repeatedly by another module. At this time I've simply increased the node counter to allow for the number of ads we need and that seems to be working.

toma’s picture

How do you resole this problem please ?

At this time I've simply increased the node counter to allow for the number of ads we need and that seems to be working.

I have the same problem in my website !

Thanks in advance

jcnventura’s picture

Status: Active » Fixed

I've now removed the ad limit counter in git.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jcnventura’s picture

Issue summary: View changes

In case somebody finds this issue. Code was removed today because back in August 2016, it seems that Google removed their per-page max limits (https://www.adpushup.com/blog/big-adsense-policy-update-all-ad-limits-pe...).

See #3004896: Remove limit-checking code as Google lifted their per-page ad limits