From PostHog
Replace posthog.capture and identify with Landscape verbs.
Map calls
| PostHog | Landscape |
|---|---|
posthog.init(apiKey, { api_host }) |
init({ endpoint }) |
posthog.capture(event, properties) |
track(event, properties) |
posthog.identify(distinctId, properties) |
identify(distinctId, properties) |
posthog.people.set(properties) |
setUserProperties(properties) |
| Autocapture / pageview config | default-on autocapture; page() or a router tracker |
posthog.reset() |
reset() |
| Feature flags / session replay | not in Landscape |
Replace an event
import { init, identify, track } from "@hyperreal/landscape-core";
init({ endpoint: "/api/events" });
track("button_clicked", { id: "cta" });
identify("user_123", { plan: "pro" });