ወደ ዋናው ይዘት ዝለል

SDK ይጫኑ

ለሚያሄዱት አካባቢ የሚስማማውን SDK ይምረጡ። እያንዳንዳቸው ወደ አንድ አይነት የመቀበያ መድረሻ ክስተቶችን ይልካሉ እና የባህሪ ምልክቶችን በአካባቢው ከአንድ አይነት ሕጎች ይገመግማሉ፣ ስለዚህ ተጠቃሚው የትኛውንም ቢመርጡ በአንድ አይነት ስርጭት ውስጥ ይወድቃል።

በእነዚህ ቅንጣቢዎች ውስጥ ያለው ቁልፍ ከኮንሶሉ ይመጣል፦ የAPI ቁልፍ ያግኙ

At a glance

Packages
@prodantix/sdk (web), prodantix_sdk (Dart), prodantix_sdk_flutter (Flutter), prodantix-sdk (Python)
Ingest host
https://eu.api.prodantix.com
Flags host
https://api.prodantix.com
Credentials
Public project key in the client, access token for GraphQL
Verify
Read the event back from the events query

አሳሽ እና Node

Bash
bun add @prodantix/sdk

# የReact መተግበሪያዎች አስማሚውንም ይወስዳሉ፦
bun add @prodantix/react
JavaScript
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 እና Dart

Bash
flutter pub add prodantix_sdk_flutter

# የDart አገልጋይ ወይም CLI፣ ያለ Flutter ንብርብር፡
dart pub add prodantix_sdk

የPython አገልጋይ

Bash
pip install prodantix-sdk

የፕሮጀክት ቁልፍዎ ይፋዊ ነው። ፕሮጀክቱን ይለያል እንጂ ወደ መረጃው መዳረሻ አይሰጥም፣ ስለዚህ በደንበኛ ኮድ ውስጥ ሊላክ ይችላል። የመጻፍ መዳረሻ ያለው የአገልጋይ ቁልፍ ግን በጭራሽ መላክ የለበትም።

እንደደረሰ ያረጋግጡ

Ingestion answers 202 as soon as the batch is accepted. To see the event itself, read it back from the events query, or watch it arrive on the realtime project room.

Bash
curl "https://api.prodantix.com/graphql" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ events(projectId: \"p_1\", limit: 5) { name receivedAt } }"}'