Using Appcues.anonymous() and Appcues.identify() together

You may want to use Appcues content in an environment with anonymous visitors or on pages where your users are logged out, for example on a marketing site. Since anonymous users don't have ids, you cannot identify them with an Appcues.identify() call. Instead you can add the Appcues.anonymous() call to your embed script and target content to these unknown users. 

To use the Appcues.identify() and Appcues.anonymous() call together, 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();
}

You can find installation instructions for the standard identify call  right here, and some more information about the anonymous call


Need more assistance?  Shoot us an email and we'll be happy to help!

Still need help? Contact Us Contact Us