• SDKS
No results for ""


Anonymous users

Read time: 3 minutes
Last edited: Apr 09, 2021


This topic explains what anonymous users are, how their information is handled in LaunchDarkly, and how they contribute to your Monthly Active Users (MAU) count.

Anonymous users are identical to regular users, but they are not stored in your dashboard. You can designate any user as an anonymous user. One of the primary reasons that users are sent anonymously is to avoid unauthenticated users diluting the useful data in the user dashboard.

Ensuring user privacy

You can use anonymous users to hide personally identifiable information (PII), but we recommend using private user attributes instead.

To learn more, read Private user attributes.

Understanding how anonymous users contribute to MAU

Anonymous users contribute to MAU. LaunchDarkly can track anonymous users in two different ways:

  • By unique key, or
  • Without unique keys

If you specify a unique key for each anonymous user, LaunchDarkly tracks those users by session. If you do not specify a unique key for each anonymous user, and the user has saving to local storage disabled, LaunchDarkly will create a new user for each request. The number of real users who have disabled saving to local storage is likely small, but bots and crawlers almost never utilize local storage. One user and/or bot with local storage disabled can drastically inflate your MAU count.

To learn more about MAU, read Account usage metrics.

Best practices for using unique keys

Sometimes it is useful to generate a unique key for anonymous users. We recommend using unique keys for the following reasons:

  • You are targeting users individually by key
  • You are using Experimentation to run A/B/n tests
  • You are using the Analytics Data Stream
  • You are conducting percentage rollouts

You do not need to uniquely identify your anonymous users. Instead, you can use a shared key for them. If you do this, you can still target users by their attributes, but you will not be able to target specific user segments unless they have unique keys.

Using anonymous users instead of unique keys may help prevent you from hitting your maximum user count.

To learn more about user limits, read Understanding the Users dashboard.

Understanding how unique keys contribute to user count

Your account is limited to 100,000,000 users by default. You may hit this limit accidentally if you use too many unique keys.

If you feel like you hit this limit too frequently, you may be creating more users than you know.

Here are some examples of ways you may be creating unique user IDs:

  • Creating users that include request IDs, so each user generates a new ID every time they request against the server. Users do not need a user ID to use a request ID. For example, an unathenticated API might only give you a request ID, not a user ID.
  • Server-to-server communication where there are no human operators, just software components interacting.
  • If you use LaunchDarkly to configure log levels or tracing, you may use a different type of ID, like a timestamp. LaunchDarkly classifies each of those IDs as unique IDs.

You can replace some of the unique IDs in the examples above with anonymous users. This will decrease your maximum user count, but keep in mind that anonymous users do not appear on the Users dashboard. Assess the components interacting with LaunchDarkly and feature flags to determine which require unique IDs, user IDs, or both, or can be classified as anonymous users.

You can remove users you don't need anymore with the LaunchDarkly API, or by clicking the Delete button on their user card. To learn more, read Removing a user.

Associating anonymous users with logged in users

This feature may not be available yet in your SDK

This section explains alias events, which are an optional feature in LaunchDarkly SDKs. This feature is being rolled out to LaunchDarkly SDKs in order of SDK adoption, with more frequently used SDKs being updated first. If you cannot find documentation for alias events in your SDK documentation, check back periodically until the feature is added. You can also contact Support.

In some cases, one person can be represented by multiple users in LaunchDarkly. If LaunchDarkly registers a person as an anonymous user, and that person later logs in to the application, LaunchDarkly will register them again as a logged-in user. This one person is now represented by two unique user keys.

You can associate these two user keys by configuring your SDK to send alias events. Alias events connect two user keys and register them as one event-sending entity.

If you use Data Export or Experimentation, alias events are useful because they make the data represented in destinations and experiment results easier to understand. Alias events enable Data Export destinations to correlate the two user keys referring to the same underlying user. They also enable experiments to recognize when impressions and conversions occurred for a user, even if the user key changed between the two events.

To learn more about configuring your SDK to send alias events, read your SDK's documentation.

mParticle events require additional configuration

If you use mParticle as a Data Export destination, you must configure it to receive alias events in the LaunchDarkly UI. mParticle requires this additional configuration step to register events correctly.

To learn more, read mParticle.