Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

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

  • Contact Us
  • Home

Using Appcues with RequireJS (Developer)

Learn how to Appcues can be used with AMD loaders like RequireJS.

Written by Ricky Perez

Updated at June 18th, 2024

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

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

  • FAQs
  • Support
  • Installation & Developers
    Installing Appcues Web API & Data Extras Troubleshooting Installing Appcues Mobile
  • Web Experiences
    Studio Building Web Experiences Customization & Styling FAQ Targeting Troubleshooting Use Cases
  • Mobile Experiences
    Building Mobile Experiences Installation & Overview Troubleshooting Mobile Analytics & Integrations
  • Account Management
    Subscription Users & Data
  • Analytics
    Experience and Event Analytics Data
  • Best Practices
    Product-led Growth Pro Tips Best Practices Use Cases
  • Integrations
    Integration Documents Extras Use Cases
  • System Status
    System Status & Incidents
  • Workflows
    Use Cases Building & Configuration Workflow Analytics and Integrations
+ More

Appcues can be used with AMD loaders, like RequireJS. If you used an AMD loader on your site, you'll want to read this doc. There are two scenarios:

  • You're loading Appcues as a window global and don't want it registered as module within your application
  • Or, you're trying to load Appcues as a module inside your application

Loading Appcues as a window global while RequireJS is present on the page

If your site uses an AMD loader, like RequireJS, to load modules, Appcues will attempt to define itself as a module once it detects the AMD loader on the page. If you're not actually planning to use Appcues as module in your application but instead want it be defined as window global, you'll need to set an option on the page to tell the Appcues script to defer defining itself as an AMD module and instead proceed to define itself as a window global. This can be accomplished by adding an AppcuesSettings object to the window. This code should be placed directly before the <script> tag for the Appcues:

<script type="text/javascript">
  window.AppcuesSettings = {
    skipAMD: true
  };
</script>

Loading Appcues as a module in your application

If you'd like to load Appcues through an AMD loader, like RequireJS, you can load it using the following snippet:

requirejs.config({    
  "paths": {
    "appcues": "//fast.appcues.com/<your_appcues_id>.js"    
  }
});

Later in your app, you can access the Appcues library with something like this:

// As an example,  we identify the user
define(['models/user', 'appcues'], function(user, Appcues) {
  Appcues.identify(user.id, {
    email: user.email,
    name: user.first_name + ' ' + user.last_name    
  });
});

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Requirements for Using Appcues
  • Anonymous Users (Developer)
  • Using Appcues with iFrames
DON'T TAKE OUR WORD FOR IT

Start building with Appcues for free

Try before you buy
No credit card required
Support included
Start building for freeBook a demo
or take an interactive tour
Appcues logo

Product

In-app messaging
Email
Push notifications
Workflows
Data
How it works
Pricing
What's new

Use cases

Onboarding
Free-trial conversion
Feature adoption
Feedback
Support

Integrations

Why connect
All integrations
All workflows

Company

About
Careers
HIRING
Why Appcues
Teams
Customers

Support

Request a demo
Start free trial
Developer Docs
Help Center
Customer Success
Contact

Resources

Product Adoption Academy
Courses
Workshops
Templates
Examples
Made with Appcues
The Appcues Blog
PLG Collective
Product-led Experience Report
The Product Experience Playbook
The Product-Led Growth Flywheel
© 2025 Appcues. All rights reserved.
SecurityTerms of ServiceWebsite Terms of UsePrivacy PolicyCookie Preferences
Expand