openpanel 0.2.0
openpanel: ^0.2.0 copied to clipboard
OpenPanel analytics for Flutter with native Android and iOS clients, persistent offline event queue and batching.
0.2.0 #
OpenpanelOptions.profileId: optional field that binds events to a profile from the very first launch. Nativeinitializeuses it as the default profile when there is no persistent binding fromidentify— every event, including the coldapp_openedon a fresh install, is reported with thisprofile_idinstead of landing on an anonymous device profile. An explicitidentifystill wins over the default. Backwards compatible: the field is optional.- SDK version bumped to 0.2.0 for the new feature.
0.1.3 #
- Android: fixed the device
localebeing reported wrong on ~40–50% of launches (a bareenregardless of the actual device language, evenly across countries, vendors and app versions). The locale was captured once per process fromLocale.getDefault()duringinitialize— before the app configuration had been applied to the process default. It is now read from the app resources configuration (context.resources.configuration) and re-read on every event, so it also follows per-app/in-app locale changes instead of being frozen for the lifetime of the process. - Documented and covered with a test the property precedence in
track: device metadata is the base, Dart global properties are merged on top, event properties win last — alocaleset viasetGlobalPropertiesoverrides the auto-collected one. - SDK version constants (
Openpanel.sdkVersionin Dart,SDK_VERSIONin Kotlin,DeviceInfo.sdkVersionin Swift) resynchronized withpubspec.yaml(they were stuck at 0.1.0).
0.1.2 #
- Android: fixed a crash (
RejectedExecutionException) that could kill the app after the Flutter engine detached while a flush or retry timer was still pending (e.g. the activity is destroyed in background while sends are backing off). Pending timers are now cancelled ondispose, and any task that still races the executor shutdown is dropped silently instead of crashing the host app.
0.1.1 #
setGlobalProperties: anullvalue now removes the property on both platforms (PostHogregister/unregistersemantics). Previously a Dartnullarrived on iOS asNSNull, which is not a property-list value and crashed the app withNSInvalidArgumentExceptionwhen persisted toUserDefaults.- iOS: global properties are persisted as JSON data instead of a raw
dictionary, so any other non-property-list value (e.g. a nested
null) can no longer crash the app either. Old plist-format storage is still read.
0.1.0 #
- Initial release with native Android (Kotlin) and iOS (Swift) clients.
- Events:
track,identify,increment,decrement. setGlobalProperties,clear,flush.- Persistent offline event queue (survives app restarts, capped at 500
events) with batching: flush on 10 queued events, after 5 seconds, when
the app goes to background or on explicit
flush(). - Automatic
app_opened/app_closedlifecycle tracking (opt-out viaOpenpanelOptions.automaticTracking). - Automatic device metadata on every event: OS name/version, device model/manufacturer, screen size, app version/build, locale.
- Self-hosted instances supported via
OpenpanelOptions.apiUrl. - Optional
OpenpanelNavigatorObserverforscreen_viewtracking.