Ein SDK installieren
Wähle das SDK für deine Laufzeitumgebung. Jedes sendet Ereignisse an denselben Ingest-Endpunkt und wertet Feature-Flags lokal nach denselben Regeln aus, sodass ein Nutzer unabhängig von deiner Wahl im selben Rollout landet.
Der Schlüssel in diesen Ausschnitten kommt aus der Konsole: API-Schlüssel erhalten
At a glance
- Packages
@prodantix/sdk(web),prodantix_sdk(Dart),prodantix_sdk_flutter(Flutter),prodantix-sdk(Python)- Credential
- The public project key: Projects & keys
- Endpoints
- Hosts and contracts: REST
Browser und Node
Bash
bun add @prodantix/sdk
# React-Apps nehmen zusätzlich den Adapter:
bun add @prodantix/reactJavaScript
import { createWebClient } from '@prodantix/sdk/web';
const prodantix = createWebClient({
apiKey: PRODANTIX_PUBLIC_KEY,
host: 'https://eu.api.prodantix.com',
flagsHost: 'https://api.prodantix.com',
});
prodantix.capture('order.completed', { properties: { amount: 4200 } });JavaScript
import { ProdantixProvider, useProdantix } from '@prodantix/react';
<ProdantixProvider options={{ apiKey: PRODANTIX_PUBLIC_KEY, host: 'https://eu.api.prodantix.com' }}>
<App />
</ProdantixProvider>
const prodantix = useProdantix();
prodantix?.capture('order.completed');Flutter und Dart
Bash
flutter pub add prodantix_sdk_flutter
# Dart-Server oder CLI, ohne die Flutter-Schicht:
dart pub add prodantix_sdkPython-Server
Bash
pip install prodantix-sdkDein Projektschlüssel ist öffentlich: Er benennt das Projekt, gewährt aber keinen Zugriff auf dessen Daten und gehört damit in den Client-Code. Ein Server-Schlüssel, der schreiben darf, niemals.
Wie es weitergeht
Schnellstart: capture a first event and read it back. Each package’s full surface is under Packages, and framework wiring (React, Vue, Svelte, Angular) under Frameworks.