মূল কনটেন্টে যান

কুইকস্টার্ট

শুরু থেকে শেষ পর্যন্ত প্রথম ইভেন্ট: একটি প্রজেক্ট তৈরি করুন, একটি SDK ইনস্টল করুন, ইভেন্টটি ক্যাপচার করুন এবং সেটি ফিরে পড়ুন।

At a glance

Credential
The public project key: Projects & keys
Install
One package for your runtime: Install an SDK
Verify
Read the event back from the events query

একটি API কী নিন

এই স্নিপেটগুলির কী কনসোল থেকে আসে: প্রজেক্ট ও কী

একটি SDK ইনস্টল করুন

The web SDK is the shortest path; every runtime, and the React, Flutter and Python packages, are on the install page.

Bash
bun add @prodantix/sdk

Capture an event

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 } });

এটি পৌঁছেছে কিনা যাচাই করুন

Ingestion answers 202 as soon as the batch is accepted (what that means). 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 } }"}'

From here, the data model says what the engine does with the event, and the frameworks guide wires the client into React, Vue, Svelte or Angular.