title: adding js on joomla head
body: <p>How I can implements below js on my joomla head section. I have tried several times to add this code but after modified on index.php file its not save on head section after review view page source its showing under body section. </p>
  
  <pre><code>     &lt;script type='text/javascript'&gt;
     (function() {
       var useSSL = 'https:' == document.location.protocol;
       var src = (useSSL ? 'https:' : 'http:') +
           '//www.googletagservices.com/tag/js/gpt.js';
       document.write('&lt;scr' + 'ipt src="' + src + '"&gt;&lt;/scr' + 'ipt&gt;');
     })();
   &lt;/script&gt;
  
   &lt;script type='text/javascript'&gt;
   googletag.cmd.push(function() {
   googletag.defineSlot('/20819282/mpbd_top_header', [728, 90], 'div-gpt-ad-1452863082329-0').addService(googletag.pubads());
   googletag.pubads().enableSyncRendering();
   googletag.enableServices();
   });
   &lt;/script&gt;
  </code></pre>