Here are a few gotchas to avoid while using LogRocket.identify:

  • LogRocket.identify only accepts strings as UIDs. Make sure to cast your UID to a string before calling this function.
  • There is no need to call LogRocket.identify for anonymous or logged out users. We use sessionStorage to persist sessions across pages for logged-out users.
  • If LogRocket.identify is called multiple times during a recording, you can search for any of the identified users in the session.