Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter sandissparkle

    (@sandissparkle)

    Thank you, everything is working now!

    Thread Starter sandissparkle

    (@sandissparkle)

    Im not quite sure what you mean? I cant find this code in my post source code?! How could i fix this so it works?

    Thread Starter sandissparkle

    (@sandissparkle)

    Okay, i found it, enabled it, but still my ads are not working!

    Thread Starter sandissparkle

    (@sandissparkle)

    How do i enable it? I have generatpress theme, the red output buffering rectangle doesnt show up when i enable Ad inserter Label blocks.

    Thread Starter sandissparkle

    (@sandissparkle)

    I have compared the codes and your provided Block code doesn’t work for some reason, this is my header and block code now.

    googletag.defineSlot(‘/22718203122/responsive_unit’, [[440,275],[390,325],[360,300],[640,400],[336,280]], ‘div-gpt-ad-1535863-[ADINSERTER counter="block"]’)
    .defineSizeMapping(mapping1)
    .addService(googletag.pubads());
    
    [ADINSERTER HEAD group="GOOGLE"]
    
    <!-- GPT AdSlot 1 for Ad unit 'responsive_unit' ### Size: [[400,250],[390,325],[340,280],[635,406],[300,250]] -->
    <div id='div-gpt-ad-1535863-[ADINSERTER counter="block"]'>
      <script>
        googletag.cmd.push(function() { googletag.display('div-gpt-ad-1535863-[ADINSERTER counter="block"]'); });
        
      </script>
    </div>
    <!-- End AdSlot 1 -->
    <!-- Start GPT Tag -->
    <script async src='https://securepubads.g.doubleclick.net/tag/js/gpt.js'></script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        var mapping1 = googletag.sizeMapping()
                                .addSize([700, 0], [[640, 400]])
                                .addSize([500, 0], [[440, 275]])
                                .addSize([425, 0], [[390, 325]])
                                .addSize([400, 0], [[360, 300]])
                                .addSize([0, 0], [[336, 280]])
                                .build();
    
     
                 [ADINSERTER name="GOOGLE"]
                
                 
                
        googletag.pubads().enableSingleRequest();
        googletag.enableServices();
      });
    </script>
    <!-- End GPT Tag -->
    Thread Starter sandissparkle

    (@sandissparkle)

    I dont quite understand what is wrong,

    [ADINSERTER counter=”block”] made no sense in the header – i removed it from header.
    [ADINSERTER HEAD group=”Google tags”] made no sense in header so i removed it also.

    [ADINSERTER name=”GOOGLE”] added this to my header and fixed my block code, what is wrong still?
    Can you fix the code if you see what exactly is not correct?

    Thread Starter sandissparkle

    (@sandissparkle)

    <!-- GPT AdSlot 1 for Ad unit 'responsive_unit' ### Size: [[400,250],[390,325],[340,280],[635,406],[300,250]] -->
    <script>
    googletag.defineSlot(‘/22718203122/responsive_unit’, [[440,275],[390,325],[360,300],[640,400],[336,280]], ‘div-gpt-ad-1535863-[ADINSERTER counter="block"]’)
    .defineSizeMapping(mapping1)
    .addService(googletag.pubads());
    
    [ADINSERTER HEAD group="GOOGLE"]
    
    </script>
    
    <div id="div-gpt-ad-1535863-[ADINSERTER counter="block"]">
      <script>
        googletag.cmd.push(function() { googletag.display('div-gpt-ad-1535863-[ADINSERTER counter="block"]'); });
        
      </script>
    </div>
    <!-- End AdSlot 1 -->
    <!-- Start GPT Tag -->
    <script async src='https://securepubads.g.doubleclick.net/tag/js/gpt.js'></script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        var mapping1 = googletag.sizeMapping()
                                .addSize([700, 0], [[640, 400]])
                                .addSize([500, 0], [[440, 275]])
                                .addSize([425, 0], [[390, 325]])
                                .addSize([400, 0], [[360, 300]])
                                .addSize([0, 0], [[336, 280]])
                                .build();
    
        googletag.defineSlot('/22718203122/responsive_unit', [[440,275],[390,325],[360,300],[640,400],[336,280]], 'div-gpt-ad-1535863-1')
                 .defineSizeMapping(mapping1)
                 .addService(googletag.pubads());
                 [ADINSERTER name="GOOGLE"];
                
                 
                
        googletag.pubads().enableSingleRequest();
        googletag.enableServices();
      });
    </script>
    <!-- End GPT Tag -->

    This is my block and header code now, its still not displaying two images, only the first one!

    • This reply was modified 3 years, 11 months ago by sandissparkle.
    • This reply was modified 3 years, 11 months ago by sandissparkle.
    • This reply was modified 3 years, 11 months ago by sandissparkle.
    Thread Starter sandissparkle

    (@sandissparkle)

    Now i fixed my header code to this, now with the inspect tool i see that the blocks have diffrent ids, but no ad image is showing up, i have enabled remote debbuging tool, if you could help:

    <!– Start GPT Tag –>
    <script async src=’https://securepubads.g.doubleclick.net/tag/js/gpt.js’></script&gt;
    <script>
    window.googletag = window.googletag || {cmd: []};
    googletag.cmd.push(function() {
    var mapping1 = googletag.sizeMapping()
    .addSize([700, 0], [[640, 400]])
    .addSize([500, 0], [[440, 275]])
    .addSize([425, 0], [[390, 325]])
    .addSize([400, 0], [[360, 300]])
    .addSize([0, 0], [[336, 280]])
    .build();

    googletag.defineSlot(‘/22718203122/responsive_unit’, [[440,275],[390,325],[360,300],[640,400],[336,280]], ‘div-gpt-ad-1535863-[ADINSERTER counter=”block”]’)
    .defineSizeMapping(mapping1)
    .addService(googletag.pubads());

    [ADINSERTER HEAD group=”Google tags”]

    googletag.pubads().enableSingleRequest();
    googletag.enableServices();
    });
    </script>
    <!– End GPT Tag –>

    Thread Starter sandissparkle

    (@sandissparkle)

    Does [ADINSERTER counter=”block”] work only for the pro version? Because i cant seem to get it fixed…

    <!-- GPT AdSlot 1 for Ad unit 'responsive_unit' ### Size: [[400,250],[390,325],[340,280],[635,406],[300,250]] -->
    <div id='div-gpt-ad-1535863-[ADINSERTER counter="block"]'>
      <script>
        googletag.cmd.push(function() { googletag.display('div-gpt-ad-1535863-[ADINSERTER counter="block"]'); });
        
      </script>
    </div>
    <!-- End AdSlot 1 -->
    <!-- Start GPT Tag -->
    <script async src='https://securepubads.g.doubleclick.net/tag/js/gpt.js'></script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        var mapping1 = googletag.sizeMapping()
                                .addSize([700, 0], [[640, 400]])
                                .addSize([500, 0], [[440, 275]])
                                .addSize([425, 0], [[390, 325]])
                                .addSize([400, 0], [[360, 300]])
                                .addSize([0, 0], [[336, 280]])
                                .build();
    
        googletag.defineSlot('/22718203122/responsive_unit', [[440,275],[390,325],[360,300],[640,400],[336,280]], 'div-gpt-ad-1535863-[ADINSERTER counter="block"]')
                 .defineSizeMapping(mapping1)
                 .addService(googletag.pubads());
    
        googletag.pubads().enableSingleRequest();
        googletag.enableServices();
      });
    </script>
    <!-- End GPT Tag -->
Viewing 9 replies - 1 through 9 (of 9 total)