US English (US)
ES Spanish

Submit Article Requests

Do you have a suggestion for an article you would like to see created?
Feel free to submit this form and add your suggestions to our document board.

Please fill out the contact form below and we will reply as soon as possible.

  • Appcues Certifications & Training
  • Integration Hub
  • Contact Us
English (US)
US English (US)
ES Spanish
  • Docs home
  • Installation & Developers
  • Installing Appcues on Web

Installing Appcues Asynchronously (Developer)

Learn how to install Appcues in your web app asynchronously.

Updated at June 19th, 2024

Submit Article Requests

Do you have a suggestion for an article you would like to see created?
Feel free to submit this form and add your suggestions to our document board.

Please fill out the contact form with the details about the help content you'd like to see.

  • Home

  • Installation & Developers

    • Web Experiences

      • Mobile Experiences

        • Workflows

          • Analytics & Data

            • Account Management

              • Best Practices

                • Integrations

                  This document includes sample code on how to install Appcues in your web app asynchronously. With this method the Appcues SDK can be loaded asynchronously, allowing it to load simultaneously with other scripts, which can lessen the impact on page load times.

                  <script>
                    (function() {
                      if (!window.AppcuesReady) {
                        window.AppcuesReady = function(callback) {
                          callback && window.AppcuesReady.q.push(callback);
                          if (window.Appcues) {
                            while (window.AppcuesReady.q.length) {
                              cb = window.AppcuesReady.q.shift();
                              if (typeof cb === 'function') cb();
                            }
                          }
                        };
                        window.AppcuesReady.q = [];
                      }
                    })()
                  </script>
                  
                  <script>
                    // You could then call Appcues methods immediately 
                    // by calling AppcuesReady() with a callback:
                    AppcuesReady(function() {
                      Appcues.identify('userId', {email: 'test@appcues.com'});
                    });
                  </script>
                  
                  <!-- Load your Appcues script at any time later -->
                  <script src="//fast.appcues.com/23.js" async onload="AppcuesReady()"></script>
                  dev install async setup asynchronously async install decrease load time less load async load page load times

                  Was this article helpful?

                  Yes
                  No
                  Give feedback about this article

                  Related Articles

                  • Installing with Google Tag Manager (Developer)
                  • Welcome and Getting Started
                  • Anonymous Users (Developer)
                  • Calling Appcues.page() vs Appcues.identify()
                  Appcues logo

                  Product

                  Why Appcues How it works Integrations Security Pricing What's new

                  Use cases

                  Appcues Integration Hub User Onboarding Software Feature Adoption Software NPS & Surveys Announcements Insights Mobile Adoption

                  Company

                  About
                  Careers

                  Support

                  Developer Docs Contact

                  Resources

                  The Appcues Blog Product Adoption Academy GoodUX Case studies Webinar Series Made with Appcues Appcues University

                  Follow us

                  Facebook icon Twitter icon grey Linkedin icon Instagram icon
                  © 2022 Appcues. All rights reserved.
                  Security Terms of Service Privacy Policy

                  Knowledge Base Software powered by Helpjuice

                  Expand