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
  • Contact Us
  • Home
  • Installation & Developers
  • Installing Appcues

Installing Appcues Asynchronously (Developer)

Updated at November 28th, 2022

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.

  • Installation & Developers
    Installing Appcues Installing Appcues Mobile API & Data Troubleshooting Extras
  • User Experiences
    Web Experiences Building Web Experiences Building Mobile Experiences Customization & Styling Targeting Studio Troubleshooting Use Cases FAQ
  • Mobile
    Installation & Overview Building Mobile Experiences Mobile Analytics Troubleshooting Mobile Use Cases
  • Account Management
    Subscription Users & Data
  • Analytics
    Experience and Event Analytics Data
  • Best Practices
    Use Cases Pro Tips PLG FAQ
  • Integrations
    Integration Documents Use Cases Resources
  • Post-mortem
    System Incidents
+ More

This document includes sample code on how to install Appcues in your web app asynchronously. With this method he 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 defer onload="AppcuesReady()"></script>

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

User Onboarding Software
Feature Adoption Software
NPS & Surveys
Announcements
Insights
Mobile Adoption

Company

About
Careers
we're Hiring

Support

Developer Docs
Contact

Resources

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

Follow us

Facebook iconTwitter icon greyLinkedin iconInstagram icon
© 2022 Appcues. All rights reserved.
SecurityTerms of ServicePrivacy Policy
Expand