LANDSCAPE

identify

Attach a user id to later events and emit an $identify event.

Identify a user

import { identify } from "@hyperreal/landscape-core";

identify("user_123", { plan: "pro", role: "admin" });

Signature

function identify(userId: string, traits?: EventProperties): void

Behavior

  • Sets userId on the client. Later events include that userId.
  • Emits $identify with { userId, ...traits }.
  • No-ops when consent is denied.