• Resolved sachristan

    (@sachristan)


    We are looking at using your plugin for our website. We use a custom header to place dfp code. Would we still be able to use your plugin? Can we choose which file for the plugin to modify?

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

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

    (@spacetime)

    Sure.
    No file needs to be modified.
    Please check this page:
    https://adinserter.pro/documentation/ad-manager-ads

    Thread Starter sachristan

    (@sachristan)

    So it won’t modify any header file?

    Plugin Author Spacetime

    (@spacetime)

    The plugin does not modify theme header file.

    Thread Starter sachristan

    (@sachristan)

    Am trying advance ads, I’ll see what they say.

    Thread Starter sachristan

    (@sachristan)

    Hi Spacetime

    We installed your plugin on a test site and pretty good so far. I am able to stack multiple (gt)ad-slots in the header area and they show up where designated :). We have a custom header for dfp, I understand I would need to make a hook to place them on that header is that correct?

    —————————–Header—————————————————

    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        
        googletag.defineSlot('/123456789/client-300x250', [300, 250], 'div-gpt-ad-987654321-0').addService(googletag.pubads());
        googletag.defineSlot('/123456789/client-300x600', [300, 600], 'div-gpt-ad-987654321-0').addService(googletag.pubads());
        
        
        googletag.pubads().enableSingleRequest();
        googletag.enableServices();
      });
    </script>

    But when placing multiple ads in the same block, they are rendered with no gutter between them ?? How can I place multiple ads in the same block and get a space placed between them? I can’t seem to find any options for that —like “Separate Ads In Blocks”

    ————————————–Block 2[Main Sidebar]————————–

    <!-- /123456789/client-300x600 -->
    <div id='div-gpt-ad-987654321-0' style='min-width: 300px; min-height: 600px;'>
      <script>
        googletag.cmd.push(function() { googletag.display('div-gpt-ad-987654321-0'); });
      </script>
    </div>
    
    <!-- /123456789/client-300x250 -->
    <div id='div-gpt-ad-987654321-0' style='min-width: 300px; min-height: 250px;'>
      <script>
        googletag.cmd.push(function() { googletag.display('div-gpt-ad-987654321-0'); });
      </script>
    </div>

    Can you point me in the right direction, I maybe missing a step.

    Thanks —Rob

    • This reply was modified 2 years, 8 months ago by sachristan.
    Plugin Author Spacetime

    (@spacetime)

    No hook is needed.
    You can put this code into the Header code window:
    https://adinserter.pro/documentation/header-and-footer-code

    Please check again the documentation on Ad Manager ads.

    To separate the ads in a block wrap them with a div with some margin, for example:

    <div style="margin: 20px;">
      AD 1
    </div>
    <div style="margin: 20px;">
      AD 2
    </div>

    But you can’t use tag ID more than once!
    IDs need to be unique on the page.

    Thread Starter sachristan

    (@sachristan)

    My bad Spacetime, I changed the actual ad id’s and used the same generic numbers, yes the tag ID are unique.

    What I meant by needing a hook is because I thought in one of your videos it was stated that we might need one if we are currently placing our tags in a custom header-adsgohere.php and not header.php. I will review your documentation again.

    Thank you —Rob

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Using a custom header for dfp’ is closed to new replies.