Lumifeed Docs
User Identification

identify()

Attach a user identity to the Lumifeed widget.

identify()

Call identify() after the user logs in to attach their identity to all future feedback submissions.

HTML / JavaScript

// After login
window.Lumifeed.identify({
  userId: "user_abc123",   // Your internal user ID (required)
  name: "Ada Lovelace",
  email: "ada@example.com",
})

Call window.Lumifeed.reset() when the user logs out.

React

Pass the user prop directly to the component — it updates automatically when the value changes:

<LumifeedWidget
  apiKey={process.env.NEXT_PUBLIC_LUMIFEED_KEY}
  user={
    session
      ? { userId: session.user.id, name: session.user.name, email: session.user.email }
      : undefined
  }
/>

Next.js (server-side session)

// app/layout.tsx
import { auth } from "@/auth"
import { LumifeedWidget } from "@lumifeed/react"

export default async function RootLayout({ children }) {
  const session = await auth()

  return (
    <html>
      <body>
        {children}
        <LumifeedWidget
          apiKey={process.env.NEXT_PUBLIC_LUMIFEED_KEY!}
          user={session?.user ? { userId: session.user.id!, email: session.user.email! } : undefined}
        />
      </body>
    </html>
  )
}

What happens

Identified feedback is stored with userId, userEmail, and userName in the feedback record. In the dashboard, you can:

  • Filter the feedback list by user
  • See all feedback from one user on their profile
  • Use user attributes in automation rules (e.g. "notify if plan = free")

On this page