• Resolved shmeegie

    (@shmeegie)


    Hi,

    Thanks in advance for your help. Great plugin.

    Remote debugging is on and cache is turned off.

    Ads are being served with Google Ad Manager.

    I am trying to insert ad blocks after every 3 or 4 paragraphs or so, using the Filter and paragraph Counter (using Block 4). The first ad shows, however only a white space where the 2nd block should be, after the 6th paragraph. I used the debugging tools, and the add block is clearly there, the ad is just not loading.

    I have also made sure there is enough creative in Google Ad Manager and set delivery to As Many as Possible.

    Is there something else I am missing? I did follow the instructions on your page for the Filter, but I can’t get it to work.

    Thanks πŸ™‚

    Regan

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Spacetime

    (@spacetime)

    Hello,

    you are inserting ad code with unique ID more than once.
    You need to make sure IDs are unique:
    https://adinserter.pro/documentation/ad-manager-ads#multiple-ads

    Thread Starter shmeegie

    (@shmeegie)

    To makae sure I understand correctly (not much of a coder), I have to;

    1. Insert this code (obviously customize it to my code) “googletag.defineSlot(‘/1234/travel/asia’, [728, 90], ‘div-gpt-ad-123456789-[ADINSERTER counter=”block”]’).addService(googletag.pubads());” and “[ADINSERTER HEAD group=”Google tags”]”

    2. Insert [ADINSERTER counter=”block”]’ where there is a “0” in the dic tag.

    3. In the head tag, duplicate this code to as many blocks as I need it? googletag.defineSlot(‘/21672606760/Paragraph_Box_300x250_Kitchissippi_Times’, [300, 250], ‘div-gpt-ad-1607355160117-0’).addService(googletag.pubads());

    Thanks,

    Regan

    Plugin Author Spacetime

    (@spacetime)

    Ad in block 2 uses this code:

    Header:

    <!-- Paragraph Box -->
    <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        googletag.defineSlot('/21672606760/Paragraph_Box_300x250_Kitchissippi_Times', [300, 250], 'div-gpt-ad-1607355160117-0').addService(googletag.pubads());
        googletag.pubads().enableSingleRequest();
        googletag.enableServices();
      });
    </script>

    Body:

    <!-- /21672606760/Paragraph_Box_300x250_Kitchissippi_Times -->
    <div id='div-gpt-ad-1607355160117-0' style='width: 300px; height: 250px;'>
      <script>
        googletag.cmd.push(function() { googletag.display('div-gpt-ad-1607355160117-0'); });
      </script>
    </div>

    You are using div-gpt-ad-1607355160117-0 which should be unique for each inserted ad slot.

    So you need to replace it with, for example, div-gpt-ad-1607355160117-[ADINSERTER counter="block"]

    Move header code for this ad into block 2 and add counter shortcode:

    <!-- Paragraph Box -->
    <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        googletag.defineSlot('/21672606760/Paragraph_Box_300x250_Kitchissippi_Times', [300, 250], 'div-gpt-ad-1607355160117-[ADINSERTER counter="block"]').addService(googletag.pubads());
        googletag.pubads().enableSingleRequest();
        googletag.enableServices();
      });
    </script>
    
    [ADINSERTER HEAD]
    
    <!-- /21672606760/Paragraph_Box_300x250_Kitchissippi_Times -->
    <div id='div-gpt-ad-1607355160117-[ADINSERTER counter="block"]' style='width: 300px; height: 250px;'>
      <script>
        googletag.cmd.push(function() { googletag.display('div-gpt-ad-1607355160117-[ADINSERTER counter="block"]'); });
      </script>
    </div>
    Thread Starter shmeegie

    (@shmeegie)

    Thanks! After reading through, I pasted in your recommended code but now ALL the boxes are blank :-). Moved the head code to the block.

    Let me know if I did something wrong or missed an instruction.

    Thanks,

    Regan

    Plugin Author Spacetime

    (@spacetime)

    Your codes are ok and properly inserted in the body part, however, it seems the header code is not inserted.
    Very likely due to output buffering incompatibility with the theme.

    If you need only two insertions then remove the code above HEAD separator in block 4 and put this code into the Header (tags for both IDs):

    <!-- Paragraph Box -->
    <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        googletag.defineSlot('/21672606760/Paragraph_Box_300x250_Kitchissippi_Times', [300, 250], 'div-gpt-ad-1607355160117-1').addService(googletag.pubads());
        googletag.defineSlot('/21672606760/Paragraph_Box_300x250_Kitchissippi_Times', [300, 250], 'div-gpt-ad-1607355160117-2').addService(googletag.pubads());
        googletag.pubads().enableSingleRequest();
        googletag.enableServices();
      });
    </script>
    
    Thread Starter shmeegie

    (@shmeegie)

    Hi!

    Thanks for all your help.

    I put the new head code in, however I put it in a separate header/footer plugin, instead of in Ad Inserter. When I had the header code in Ad Inserter, I got blank boxes again. It dawned on me to try this when you mentioned “output buffering incompatibility with the theme.”.

    We are on the .com platform, instead of .org which adds limitations and the need for extra workarounds sometimes. Not sure if this is fixable for Ad Inserter or not, to increase compatibility with the .com platform.

    Other than that, this is a fantastic tool.

    Thanks again πŸ™‚

    Regan

    Plugin Author Spacetime

    (@spacetime)

    You are welcome!

    It seems you did not put the header code in the Header.
    Remove the HEAD separator and the code above in block 4 (as in your case it does not work this way).

    This code goes into the Header (where it was before) and not block 4:

    <!-- Paragraph Box -->
    <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        googletag.defineSlot('/21672606760/Paragraph_Box_300x250_Kitchissippi_Times', [300, 250], 'div-gpt-ad-1607355160117-1').addService(googletag.pubads());
        googletag.defineSlot('/21672606760/Paragraph_Box_300x250_Kitchissippi_Times', [300, 250], 'div-gpt-ad-1607355160117-2').addService(googletag.pubads());
        googletag.pubads().enableSingleRequest();
        googletag.enableServices();
      });
    </script>
    Thread Starter shmeegie

    (@shmeegie)

    Aha! Thank you for clarifying.

    Regan

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Ads between paragraphs not loading’ is closed to new replies.