LANDSCAPE

From GA4

Replace gtag calls with Landscape init, track, identify, and page.

Map calls

GA4 Landscape
gtag('config', MEASUREMENT_ID) init({ endpoint })
gtag('event', name, params) track(name, params)
gtag('set', 'user_id', id) identify(id)
gtag('event', 'page_view', …) page(properties) or a router tracker
Consent Mode (analytics_storage) setConsent({ analytics })
User properties setUserProperties(traits)

Replace an event

import { init, track } from "@hyperreal/landscape-core";

init({ endpoint: "/api/events" });
track("sign_up", { method: "google" });

Constraints