Identify Users

How do I identify my users or customers using Zipy?

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 for iOS in you application

  2. Import ZipyiOS where you want to identify the user

import ZipyiOS
  1. Call the identify function like this

// Basic user identification without custom keys
Zipy.identify(
        externalUUId: "user123",
        userInfo: [
            "email": "[email protected]",
            "firstName": "John",
            "lastName": "Doe",
            "customerName": "ACME Corp"
        ]
    )

Anonymize a User

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

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:

Previously identified users of your application can be anonymized by calling the zipy.anonymize() method. 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:

Zipy.identify(
        externalUUId: "user123",
        userInfo: [
            "email": "[email protected]",
            "firstName": "John",
            "lastName": "Doe",
            "customerName": "ACME Corp",
            "role": "admin",
            "plan": "premium",
            "country": "US"
        ]
    )

In case you want to add your own custom identifiers in addition to the identifiers we have defined for you, please reach out to [email protected].

Last updated