Package-level declarations

Types

Link copied to clipboard
interface AnalyticsClient

Provider-agnostic analytics client interface. Apps implement (or bridge) this against whatever analytics SDK they use (Firebase, Amplitude, PostHog, etc.); the shared library only depends on this interface, never a concrete provider.

Link copied to clipboard
data class AnalyticsEvent(val name: String, val properties: Map<String, Any> = emptyMap())

A trackable analytics event.

Link copied to clipboard

Truncates/limits event and user-property payloads to conservative size limits shared by most analytics providers (event parameter counts, string lengths). Apply before calling AnalyticsClient.track/AnalyticsClient.setUserProperties to avoid provider-side rejection or truncation surprises.

Link copied to clipboard

Forwards every call to all configured clients, so apps can fan out to multiple providers.

Link copied to clipboard

Analytics client that logs every call, for local and staging verification.

Link copied to clipboard
class NoOpAnalyticsClient(logger: KommonLogger = NoOpLogger) : AnalyticsClient

Analytics client that does nothing but log at debug level. Useful for debug builds.