Ad block insertions duplicated in header
-
Hi,
Here you have the details about the issue. I would appreciate your help.
PROBLEM:
An ad block that is inserted multiple times using multiple shortcodes is actually being duplicated in the head section.SETUP:
Ad Inserter version is 2.7.22Examples of recent post pages:
https://destinoreinounido.com/que-hacer-en-londres-en-navidad/
https://destinoreinounido.com/que-ver-hacer-visitar-en-londres-con-ninos/The blog has ads inside posts, sidebars and other locations. They are managed by Google Ad Manager and inserted by AdInserter. The configuration has been working for a long time but recently I have found that the ads inside posts are not showing.
Every post has a variable number of ads depending on the post’s length that I insert manually with the shortcode for block #5. That means that one post would have 5 ads, another 2 or 7 or whatever.
THE ISSUE:
I recently found the site had the error “googletag.defineSlot was called without a matching googletag.display call.” That means that there is a mismatch between the number of times the ads are defined in the header and the times they are inserted in the page.The issue appears when inserting one block a multiple number of times (in my case block #5). The block is duplicated in the head section.
So, if a post has 5 insertions of the shortcode, the block code actually appears 10 times in the head section but only 5 times in the post. That mismatch generates the “googletag.defineSlot was called without a matching googletag.display call” error message.
Other ads that are inserted only once, like the ones in the sidebar, work fine.
I’ve seen a similar issue documented here (https://ww.wp.xz.cn/support/topic/add-duplication/) and here (https://ww.wp.xz.cn/support/topic/adinserter-header-being-duplicated/) so I’ve tried changing the Filter parameter but the block is still added twice.
Any help would be appreciated.
Many thanks
The page I need help with: [log in to see the link]
The topic ‘Ad block insertions duplicated in header’ is closed to new replies.