# User ID

{% hint style="info" %}
User ID is a unique identifier created for clients to distinguish users.&#x20;
{% endhint %}

To send messages based on the ID, proper integration is essential. When a user logs in, link the customer-managed user ID with the FlareLane device to distinguish between members and non-members.

## **Integrating User ID**

When a user successfully **logs in or registers**, assign a user ID so that the device can be identified using the customer’s user ID. Here's an example:

* [**Web SDK**](https://guide.flarelane.com/guide-for-developers/web-sdk-reference) **/** [**Mobile SDK**](https://guide.flarelane.com/guide-for-developers/mobile-sdk-reference): `FlareLane.setUserID("USER_ID")`

***

## **Checking User ID**&#x20;

Once the integration is complete, you can create groups to distinguish between members and non-members by using a filter in the segment that checks for the presence of a user ID.

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2Fr4jvzbQ7eieGzUxAoGqx%2F%EC%9C%A0%EC%A0%80ID_%EC%A0%84%EC%B2%B4%EA%B8%B0%EA%B8%B0.png?alt=media&#x26;token=d2e750b4-53d9-4f7b-a9dd-995c05376e27" alt="FlareLane All Devices page showing how to add User ID which identifies the customers as members or non-members"><figcaption><p><em>Image by FlareLane</em></p></figcaption></figure>

## Filtering Users

Using the user ID, you can segment your users into registered users and unregistered users, as shown below:

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FsWSXKDdREya9LUzEJ0tX%2F%EC%9C%A0%EC%A0%80ID_%EC%84%B8%EA%B7%B8%EB%A8%BC%ED%8A%B8.png?alt=media&#x26;token=bf660097-b31d-44d6-bdd5-71ada4bc5e7c" alt="FlareLane Segments page showing how to use User ID to create members and non-members segments"><figcaption><p>Image by FlareLane</p></figcaption></figure>
