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
  • Docs home
  • Installation & Developers
  • Installing Appcues Web

Anonymous Users (Developer)

Learn more about installing Appcues for anonymous users.

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.

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

Table of Contents

Installing Appcues for anonymous users A word of warning How to install with anonymous users  Important to Note: Need help identifying users?

Installing Appcues for anonymous users

You can target users on a public site or during anonymous usage in your application using Appcues.anonymous() instead of Appcues.identify() .

A word of warning  

We advise against installing Appcues on public pages or tracking users anonymously in your application. Appcues bases your billing on the monthly active users (MAUs) in your application. If you install using Appcues.anonymous(), each user will be counted for each new session and could cause users to be counted multiple times toward your MAU limit. Appcues is powerful because it has the ability to show content to the right users at the right time -- and you need to know who your users are in order to do so. You can use the  Appcues.identify() call described in the Installation Guide to identify users.

How to install with anonymous users  

If you do install Appcues on a public-facing page or during anonymous usage, replace the Appcues.identify() call with an Appcues.anonymous() call.

You will use the Appcues.anonymous() method to tell us when an anonymous/unknown user has visited your site. Appcues will generate a unique ID for this visitor and store it in their web browser; then we'll check if there's content for which the visitor qualifies. When they qualify, the content is shown.  

If your app is a standard web-app with full page loads for each page, then you can call the function once per page, like so:

<body>
    <!-- ...Normal application HTML... -->
    <script type="text/javascript">
        Appcues.anonymous();
    </script>
</body>

If your app is a "single-page app" (i.e. uses Backbone, Angular, Ember, etc) and doesn't trigger a page reload when the user navigates, then you'll want to call the function in the application router. For example, when using the ngRoute module of Angular, it might look something like this:

$rootScope.$on("$routeChangeSuccess", function(currentRoute, previousRoute){
    // Do whatever you'd normally do.
    Appcues.anonymous();
});

If you are installed via Segment, we recommend using Segment's ready() call to ensure that Segment has loaded our script before trying call the Appcues.anonymous() function:

analytics.ready(function(){
    Appcues.anonymous();
});

To use either the  Appcues.identify() call or the Appcues.anonymous()  call under certain conditions, you'll have to add conditional formatting to target both specific users and all visitors. Here's what that code looks like:

if (userId) {
    Appcues.identify(userId);
} else {
    Appcues.anonymous();
}

Important to Note:

This method of identifying anonymous users uses the browser's storage mechanism, which is not shared across devices. Because we do not have an email address or user ID to identify the user across devices and browsers, they could see Appcues multiple times. People who use multiple devices or "incognito" browsers are pretty aware of this fact and usually don't mind seeing a duplicate message or two. If the user stays on the same device and browser, the anonymous ID persists until the user clears the cache or website data.

Be sure to only call either Appcues.identify() or Appcues.anonymous() on each page load. If both are called on the same page, the identity will switch between them and could cause the user to see the same content multiple times. 

 

Need help identifying users? 

We highly recommend using  Appcues.identify() and avoiding anonymous users all together. If you are having trouble with installation please reach out to our team at [email protected] and we can help you install just right! 

developers anonymous users pre login page user not identified

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Calling Appcues.page() vs Appcues.identify()
  • Single-page Application (SPA) Guide (Developer)
  • Appcues Installation Overview
  • User Properties Overview
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

OSZAR »