> For the complete documentation index, see [llms.txt](https://docs.zipy.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zipy.ai/zipy-for-mobile/android-setup/identify-users.md).

# Identify Users

## Identify a User

To identify **users you will need to additionally call Zipy.identify(uuid, {userInfo}).** This will help you identify the users of your application by associating your own unique identifier with their activity. This method should typically be called when your users identify themselves by signing in to your application.

To identify users you need to-

1. [Install zipy](/zipy-for-mobile/android-setup/install-in-an-android-app.md) for android in you application
2. Import Zipy where you want to identify the user

```swift
import com.zipy.zipyandroid.Zipy;
```

3. Call the identify function like this

```swift
// Associates the current session with a specific user identity
val userInfo = HashMap<String, Any>().apply {
    put("email", "john.doe@example.com")
    put("firstName", "John")
    put("lastName", "Doe")
    put("customerName", "ACME Corp")
    // Additional custom fields
    put("role", "developer")
    put("plan", "enterprise")
    put("region", "US-West")
    put("teamSize", 15)
    put("lastLogin", System.currentTimeMillis())
    }
            
// Call identify with a unique external ID and user info
Zipy.identify("user_${System.currentTimeMillis()}", userInfo)
```

## Anonymize a User

To anonymize or disassociate a identified user of your application from the session, use the following code in a source file where the user signs out of your application:

```swift
import com.zipy.zipyandroid.Zipy;

// Clears all user-identifying information and creates a new session
Zipy.anonymize();
```

> **Note:** We recommend calling `Zipy.anonymize()` when the user logs out. This ends the current identified session and starts a fresh, anonymous session, ensuring that subsequent activity isn't mistakenly linked to the previous user.

**The** `uuid` **sent to Zipy can be viewed in the Session Replays list in the user column, as shown in the image below:**

<figure><img src="/files/MRLIq78eQDjK5nK8Vg0O" alt=""><figcaption></figcaption></figure>

**Previously identified users of your application can be anonymized by calling the zipy.anonymize()** m**ethod. This will automatically split the session and associate the new session with a new anonymous user which Zipy will identify with its own identification. This method should typically be called when users sign out of your application.**

## Custom Identifiers

We allow a maximum of 10 custom identifiers per project which can be created as per your use-case. To use custom identifiers, you can add them to the existing userInfo object in Zipy’s identify method:

**In case you want to add your own custom identifiers in addition to the identifiers we have defined for you, please reach out to <support@zipy.ai>.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zipy.ai/zipy-for-mobile/android-setup/identify-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
