Q&A
Mr. Pickles the AdPlugg Pug

The JS snippet is putting two ads in a zone at the same time

+1
0
-1

This is all I have on my HTML page and it loads in every single ad that is targeted to that zone. Any idea what is going on?

window.onload = function() {
  var params = window.location.search || '';
  var searchParams = new URLSearchParams(params);
  if (searchParams.has('zone')) {
    var adPluggDiv = document.createElement('div');
    adPluggDiv.classList.add('adplugg-tag');
    adPluggDiv.setAttribute('data-adplugg-zone', searchParams.get('zone'));
    document.body.appendChild(adPluggDiv);
    (function(ac) {
      var d = document, s = 'script', id = 'adplugg-adjs';
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id; js.async = 1;
      js.src = '//www.adplugg.com/serve/' + ac + '/js/1.1/ad.js';
      fjs.parentNode.insertBefore(js, fjs);
    }('redacted'));
  }
}

 



Answers

+1
1
-1

I found there's a setting on the Zone where you can put in the max number of ads. I guess the default is all of them instead of one.