Developers
Capacitor: quickstart
Install and first-use steps for sending events to Feralin with Capacitor. Code samples come from the SDK's own README and statuses from the capability record.
Install
There is no package published on npm yet. The package is downloaded from feralin.com; the commands first verify the SHA-256 digest of feralin-capacitor-0.1.0.tar.gz and stop if verification fails.
mkdir -p feralin-sdk
curl -fsSL https://feralin.com/sdk/packages/feralin-capacitor-0.1.0.tar.gz -o feralin-sdk/feralin-capacitor-0.1.0.tar.gz
echo "49a75170af21865b7af6cdf11ca63fa98a33dabf66f4c8b0ff9cb32c1ba231b4 feralin-sdk/feralin-capacitor-0.1.0.tar.gz" | sha256sum -c -
tar -xzf feralin-sdk/feralin-capacitor-0.1.0.tar.gz -C feralin-sdk
(cd feralin-sdk/feralin-capacitor-0.1.0 && npm install --no-save @capacitor/core@8 @feralin/web@0.1.0 typescript@5.9.3 && npx tsc -p tsconfig.json && npm pack --ignore-scripts)
npm install ./feralin-sdk/feralin-capacitor-0.1.0/feralin-capacitor-0.1.0.tgz
npx cap syncFirst use
import { Feralin } from "@feralin/capacitor";
const ready = await Feralin.initialize({
projectKey: "pk_live_...", // yalnız public anahtar; sk_ reddedilir
collectUrl: "https://collect.example.com",
consent: savedConsent(), // CMP'nizin saklı kararı
attribution: { apiUrl: "https://api.example.com", projectId: "prj_..." }, // iOS ertelenmiş derin bağlantı için
});
await Feralin.trackFirstOpen(); // iOS: kurulum başına bir kez; Android: "automatic"; web: "not_supported"
await Feralin.track("level_up", { level: 3 });
await Feralin.trackRevenue({ transactionId: "order_1", amountMinor: 4999, currency: "TRY" });
const link = await Feralin.consumeDeferredDeepLink();
if (link.status === "delivered" && link.path) router.push(link.path); // yolu kendi tablonuzla eşleştirin
// Kaldırma ölçümü (push eklentinizden gelen belirteç ve ileti verisi)
await Feralin.setPushToken(token); // Android: FCM belirteci; iOS: APNs belirtecinin onaltılı yazımı
if (Feralin.isUninstallCheck(notification.data)) return;Code samples are taken as they are from sdks/capacitor/README.md; comments inside may be in Turkish. You create the project key in the dashboard.
Capabilities
| Capability | Status |
|---|---|
| Event sending | Partial |
| Batch sending | Partial |
| Consent handling | Partial |
| Identity | Partial |
| Attribution | Partial |
| Deep links | Partial |
| Revenue | Partial |
| Error capture | Not supported |
| Session replay | Not applicable |
| Tracing | Planned |
Verification chain
| Link | Status |
|---|---|
| Source | Partial |
| Build | Partial |
| Test | Passed |
| Registry publication | Waiting for external access |
| Clean install | Not run |
| Event receipt | Not run |
| Documentation | Passed |
| Super Admin proof | Not started |
Passed means local evidence: source, build and tests ran. Registry publication and Super Admin proof are separate links; the SDK is not called ready until each has passed.