> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useflytrap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Identify user in bug report

> Identify which user had the error that was reported to Flytrap. Use this to increase more quickly solve customer support inquiries.

## Installing

Install the `useflytrap` package to your project.

<CodeGroup>
  ```bash npm theme={null}
  npm install useflytrap
  ```

  ```bash yarn theme={null}
  yarn add useflytrap
  ```

  ```bash pnpm theme={null}
  pnpm install useflytrap
  ```
</CodeGroup>

## Identify user in the code

Add the Flytrap `identify` function when your user signs in. This can be done in the \_app.tsx file for instance in Next.js. The `identify` function does not persist anything, so it needs to be called before a bug is captured.

<CodeGroup>
  ```typescript _app.tsx theme={null}
  import { identify } from 'useflytrap'

  identify(ctx.user.email)

  ```
</CodeGroup>

<Snippet file="learn-more.mdx" />
