Installing Appcues Asynchronously

<script>
  (function(a, ns, cb, l) {
    l = document.createElement('link');
    l.rel = "stylesheet"
    l.type = "text/css"
    l.href = "//fast.appcues.com/appcues.css"
    l.id = 'appcues-css'
    document.getElementsByTagName('head')[0].appendChild(l);
    window[ns] = function(callback) {
      (window[ns].q = window[ns].q || []).push(callback);
      if (window[a] != null) {
        while (window[ns].q.length) {
          cb = window[ns].q.shift();
          if (typeof cb === 'function') cb();
        }
      }
    };
  })('Appcues', 'AppcuesReady');
</script>

<script>
  // You could then use Appcues immediately by calling AppcuesReady() with a callback:
  AppcuesReady(function() {
    Appcues.identify('userId', {email: 'test@appcues.com'});
  });
</script>

<!-- Load the script at any time later -->
<script src="//fast.appcues.com/23.js" async defer onload="AppcuesReady()"></script>

Still need help? Contact Us Contact Us