Installation
Installieren Sie das @converlay/sdk-Paket, um serverseitiges Event-Tracking zu jeder Headless-Storefront hinzuzufügen — Hydrogen, Next.js, Remix, Nuxt oder einfaches HTML.
Paket installieren
npm
npm install @converlay/sdkpnpm
pnpm add @converlay/sdkyarn
yarn add @converlay/sdkPaketdetails
Keine Abhängigkeiten, ~2 KB gzipped. Liefert ESM + CJS Dual Build mit Ziel ES2020.
Konfigurationsoptionen
| Option | Typ | Standard | Beschreibung |
|---|---|---|---|
shopDomain | string | — | Erforderlich. Ihre .myshopify.com-Domain |
endpoint | string | https://converlay.app/api/events/collect | Collection-API-Endpunkt |
autoPageView | boolean | false | Automatisch page_view bei Initialisierung senden |
debug | boolean | false | Events in der Browser-Konsole protokollieren |
consent | ConsentInput | {analytics: true, marketing: true} | Anfänglicher Einwilligungsstatus |
Einstiegspunkte
| Import | Inhalt |
|---|---|
@converlay/sdk | createConverlay-Factory-Funktion |
@converlay/sdk/react | ConverlayProvider + useConverlay-Hook (Peer-Abhängigkeit: react >= 18) |