FunnableAnalytics
Minimal analytics client that reports gameplay milestones back to Funnable. Uses the Beacon API when available so telemetry is still delivered while a player closes or background the tab.
FunnableAnalytics
Minimal analytics client that reports gameplay milestones back to Funnable. Uses the Beacon API when available so telemetry is still delivered while a player closes or background the tab.
Examples
const sdk = Funnable.init();
sdk.analytics.trackPlay();
sdk.analytics.trackEvent("boss_defeated", { attempt: 3 });Members
trackPlay
trackPlay(): voidEmits a "play" event that the platform uses for retention dashboards. Call this once after the player starts a session or launches a new level.
trackEvent
trackEvent(name: string, data?: Record<string, unknown>): voidSends a custom analytics event with optional structured metadata.
Examples
sdk.analytics.trackEvent("power_up", { type: "shield", remaining: 12 });