title: Google Tag Manager delaying window.load?
body: <p>I have a page that fires an ajax call on load</p>
  
  <pre><code>$(window).load(function() {
    updateDeliverySlots();
  });
  </code></pre>
  
  <p>I also have Google Tag Manager javascript at the top of my <strong>body</strong> (I know the current suggestion is to place this in the <strong>head</strong> section, but we haven't updated the code yet, and don't think that is the source of the problem).</p>
  
  <pre><code>&lt;body&gt;
          &lt;!-- Google Tag Manager --&gt;
  &lt;noscript&gt;
      &lt;iframe src="//www.googletagmanager.com/ns.html?id=XXXX" height="0" width="0" style="display:none;visibility:hidden"&gt;
      &lt;/iframe&gt;
  &lt;/noscript&gt;
  &lt;script&gt;
      (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});
      var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&amp;l='+l:'';
      j.async=true;
  j.src='//www.googletagmanager.com/gtm.jsid='+i+dl;f.parentNode.insertBefore(j,f);
  })
  (window,document,'script','dataLayer','XXXX');
  &lt;/script&gt;
  &lt;!-- End Google Tag Manager --&gt;
  ....
  &lt;/body&gt;
  </code></pre>
  
  <p>I have a problem with one of the calls made by a script included in a GTM tag. This script sends a request to a third party. If the request can't connect for whatever reason (eg. server being down) my updateDeliverySlots() function (and the ajax call therein) is not fired until the request times out (60 seconds). I also find that the page is still 'loading' (according to the browser icons).</p>
  
  <p>Is there something in my GTM implementation that I am doing wrong? It was my understanding that everything fired on the back of Google Tags should be asynchronous and would have no bearing on the 'readiness' of the page.</p>