title: Facebook Conversion Pixel vs Script tag with Async
body: <p>Facebook recommends the following code be added to a webpage to allow conversion tracking. This is one of several similar "beacons" we have installed on our site. Many of them are using the "createElement" method to insert the script tag dynamically into the document model...</p>
  
  <pre><code>&lt;script&gt;
  (function() {
    var _fbq = window._fbq || (window._fbq = []);
    if (!_fbq.loaded) {
      var fbds = document.createElement('script');
      fbds.async = true;
      fbds.src = '//connect.facebook.net/en_US/fbds.js';
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(fbds, s);
      _fbq.loaded = true;
    }
  })();
  window._fbq = window._fbq || [];
  _fbq.push(['track','1234567890',{'value':'10.00','currency':'USD'}]);
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Question, can the code be simplified to use the following script tag...</strong></p>
  
  <pre><code>&lt;script src="//connect.facebook.net/en_US/fbds.js" async&gt;&lt;/script&gt;
  &lt;script&gt;
     window._fbq = window._fbq || [];
     _fbq.loaded = true; // This may not even be needed anymore
     _fbq.push(['track','1234567890',{'value':'10.00','currency':'USD'}]);
  &lt;/script&gt;
  </code></pre>