Developers
Electron: quickstart
Install and first-use steps for sending events to Feralin with Electron. Code samples come from the SDK's own README and statuses from the capability record.
Install
@feralin/electron 0.1.0 is published on npm; install it with your package manager using the command below.
npm install @feralin/node @feralin/electronFirst use
import { app, BrowserWindow, ipcMain } from "electron";
import { createFeralinMain } from "@feralin/electron/main";
app.whenReady().then(() => {
createFeralinMain({
ipcMain,
app, // kapanışta kuyruk gönderilir, sürüm ve dil olaya eklenir
projectKey: "pk_live_…",
collectUrl: "https://collect.example.com",
allowedOrigins: ["app://arayuz"],
});
new BrowserWindow({ webPreferences: { preload: PRELOAD_YOLU, contextIsolation: true, sandbox: true } });
});import { contextBridge, ipcRenderer } from "electron";
import { exposeFeralin } from "@feralin/electron/preload";
exposeFeralin({ contextBridge, ipcRenderer });npx esbuild preload.ts --bundle --platform=node --format=cjs --external:electron --outfile=preload.bundle.cjsimport { getFeralin } from "@feralin/electron/renderer";
const feralin = getFeralin();
await feralin.setConsent({ analytics: true, advertising: false });
await feralin.track("project_opened");Code samples are taken as they are from sdks/electron/README.md; comments inside may be in Turkish. You create the project key in the dashboard.
Capabilities
| Capability | Status |
|---|---|
| Event sending | Supported |
| Batch sending | Partial |
| Consent handling | Supported |
| Identity | Partial |
| Attribution | Partial |
| Deep links | Partial |
| Revenue | Partial |
| Error capture | Partial |
| Session replay | Planned |
| Tracing | Planned |
Verification chain
| Link | Status |
|---|---|
| Source | Passed |
| Build | Passed |
| Test | Passed |
| Registry publication | Passed |
| Clean install | Passed |
| Event receipt | Passed |
| 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.