title: Google's DoubleClick for Publishers Ad serving system is not working
body: <p>We have a running project in which client has asked to implement Google DoubleClick for Advertising. Client has given us sample code from DFA which we have tried to implement in our category pages but it is not working at all. Can anyone please take a look below and let me know what it could be that ADs are not being displayed at all and throwing just errors.</p>
  
  <p><strong>HEADER PART</strong>:</p>
  
  <pre><code>    &lt;script type='text/javascript'&gt;
  vargoogletag = googletag || {};
  googletag.cmd = googletag.cmd || [];
  (function() {
  var gads = document.createElement('script');
  gads.async = true;
  gads.type = 'text/javascript';
  varuseSSL = 'https:' == document.location.protocol;
  gads.src = (useSSL ? 'https:' : 'http:') + 
  '//www.googletagservices.com/tag/js/gpt.js';
  var node = document.getElementsByTagName('script')[0];
  node.parentNode.insertBefore(gads, node);
  })();
  &lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt; 
  googletag.cmd.push(function() {
  googletag.defineSlot('/2408346/Asociacion_bottom', [728, 90], 'div-gpt-ad-1340819095858-0').addService(googletag.pubads());
  googletag.pubads().enableSingleRequest();
  googletag.enableServices();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Document Body PART</strong>:</p>
  
  <pre><code>&lt;div id='div-gpt-ad-1340819095858-0' style='width:728px; height:90px;'&gt;
  &lt;script type='text/javascript'&gt;
          googletag.cmd.push(function() { googletag.display('div-gpt-ad-1340819095858-0'); });
  &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <p>Throwing errors and not displaying any AD at all (even in all browsers):</p>
  
  <p><strong>ERRORS LIST</strong>:</p>
  
  <pre><code>googletag is not defined
  [Break On This Error] vargoogletag = googletag || {};
  
  googletag is not defined
  [Break On This Error] googletag.cmd.push(function() {
  
  googletag is not defined
  [Break On This Error] googletag.cmd.push(function() { goog...y('div-gpt-ad-1340819095858-0'); }); 
  </code></pre>