Customer User ID field (CUID)

At a glance: The CUID enables you to group events of the same user across different devices, media sources, or channels.

What is CUID?

The Customer User ID (CUID) is a unique user identifier. It is usually generated and set by the app owner at the time of user registration. The CUID lets app owners follow user journeys across different devices.


A user with two or more devices has the same CUID within an app. Each time the user performs an event on a mobile or desktop device, the event is captured along with the CUID. This enables the advertiser to combine the devices' data into a holistic user view.

A few use cases:

  • In-app purchases performed by the same user in the same app but on multiple devices (phone, tablet, TV, desktop) can be combined in a single view.
  • User performance in a game installed on multiple platforms (desktop, mobile, TV) can be shared across these platforms to achieve a holistic user experience.

Setting the CUID

Its recommended to set the CUID as early as possible in the SDK initialization flow so that as many events as possible get a CUID association.

Android nativeiOS nativeUnityReact Native

Once the CUID is available, you can set it by calling setCustomerUserID. The CUID can only be associated with in-app events occurring after it was set. Therefore the install event will not be associated with the CUID when start is called before setCustomerUserID.

Associate the CUID with the install event

If it’s important for you to associate the install event to the CUID, you should set it before calling start.

Important: Remember that setting the CUID before start may block the SDK from sending the install event and thus prevent the attribution from happening. This can occur, for example, when the user launches the application for the first time and then exits before the SDK can set the CUID.

In Android, the start method and CUID setup can be executed from either the global Application class or an Activity class, depending on the app implementation. For more information, refer to Select in what class to start the SDK.

If the SDK starts in the Application class

If you want to associate the CUID with the install event when starting from the global Application class make sure to delay sending out the install event using the waitForCustomerUserId method. This method puts the SDK on waiting mode until the CUID is set.

Note: If for some reason setting the CUID fails, the SDK will stay in waiting mode and not send out any events.

If the SDK starts in an Activity class

If you want to associate the CUID with the install event when starting from an Activity class you don’t have to delay sending the install event. Simply call setCustomerUserId before calling start.


Inform the developer of the following:

  • Use waitForCustomerUserId if the SDK starts in the global Application class
  • Developer links:
    • If you want to associate the CUID with the install event, see here.

CUID and privacy

AppsFlyer values and respects the privacy of your users and doesn't permit the collection or transfer of sensitive personal data to the AppsFlyer platform.

To secure the privacy of your users, it is not allowed to design the CUID with information directly identifying the user. This includes social security or national identification numbers.

Furthermore, should the set CUID contain a user's email address or phone number,  such information must always be hashed upon sending to AppsFlyer. It is prohibited to send unhashed CUID's containing personal data to AppsFlyer.

See also