Skip to content

User identifier not updated #31

@putheaokoone

Description

@putheaokoone

We followed this document to set up a user on Piano Analytics SDK.

The problem is when we send events after calling pa.deleteUser(), we still observe the user_id and user_category registered in the Piano console. Even if we attempt to set up new user_id and user_category values, the old ones persist in the recode. These values remain unchanged unless we clear the application cache.

Setting up User

On user login, we set Piano user identifiers using:

pa.setUser("{{user_id}}", category: "{{user_category}}", enableStorage: Bool = true) 
// we tried enableStorage = false as well

Every event sent after this would have the correct user_id and user_category embedded.

Deleting User

When a user logs out, we attempt to delete their Piano user identifiers using the following code:

pa.deleteUser()

To confirm if this function works, we call the following function:

pa.getUser { user in
  print(user?.id) // nil
  print(user?.category) // nil
}

The user returned by pa.getUser is null, which confirms that the user has been successfully deleted.
However, when we send any events after this, we would still observe the old user_id and user_category in the Piano console recode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions