> ## 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.

```bash npm theme={null}
npm install useflytrap
```

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

```bash pnpm theme={null}
pnpm install useflytrap
```

## 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.

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

identify(ctx.user.email)

```

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.