flutter_umami_analytics 1.2.0
flutter_umami_analytics: ^1.2.0 copied to clipboard
Flutter client for Umami Analytics. Track pageviews, events, and sessions offline with auto-route tracking, persistent device ID, and opt-in REST API.
Changelog #
1.2.0 #
- Feat:
FlutterUmamiConfig.defaultEventUrllets you define the URL assigned totrackEventcalls that omit theurlargument at init time. Defaults to the new public constantkDefaultEventUrl(/event), preserving backwards compatibility with existing Umami dashboards. An explicit per-callurlalways takes precedence.TrackingCollectornow reads the default from config instead of a hardcoded/eventconstant. The field is part ofcopyWith, value equality, andhashCode; it is not per-call overridable viaUmamiConfigOverrides(same policy asendpointandhttpTimeout). - Docs:
doc/{en,es}/1-initialization.mddocument the newdefaultEventUrlconfig field;doc/{en,es}/3-tracking.mdclarify thetrackEventurldefault now resolves fromFlutterUmamiConfig.defaultEventUrl.
1.1.0 #
- Feat:
createUmamiAnalyticsnow accepts injectedhttpClientPortandapiClient(UmamiApiPort). Injected ports take precedence overhttpClient/enableApiand are NOT disposed by the facade or collector (caller owns lifecycle).TrackingCollector.ownsHttpClientandFlutterUmamiAnalytics.ownsApiClientgate disposal (defaulttruefor backwards compatibility). - Feat:
createUmamiAnalyticsnow accepts an injectedUmamiQueue, decoupling queue policy from adapter-selection. Lets callers plug custom storage (Hive, Isar, Realm, ObjectBox, SharedPreferences, etc.) without forking the package. Enqueue-on-failure and TTL-purge-on-flush policies are derived in_policyFromfromUmamiQueueConfig. The queue is only closed by the collector when it built it. - Docs: new
doc/{en,es}/11-credentials-security.mdcentralizing the secrets table, two pipelines (tracking vs REST), JWT lifecycle, non-persistence guarantees, best practices and production checklist. Cross-linked from1-initialization.mdand9-api-client.md. - Docs: README splits the Documentation section into
doc/en/anddoc/es/subsections, each listing all 11 guides.
1.0.1 #
- Fix: per-call
UmamiConfigOverrides(websiteId,hostname,language,userId) now applied to the outgoing payload intrackPageView,trackEvent, andidentify. Previously the merged config was computed but the payload was still built from the base config, so overrides had no effect on those fields. - Docs: added dartdoc (
///) to all public API symbols acrossdomain,application,infrastructure, andfactory.dart. - Docs: added English documentation set under
doc/en/(initialization, queue, tracking, observer, identify, overrides, device, logging, API client, advanced) and refreshed Spanish docs underdoc/es/.
1.0.0 #
- Initial release.
- Pageview and event tracking with automatic device info (locale, screen, User-Agent per platform).
- Offline queue strategies:
disabled,inMemory,persisted(SQLite with TTL, auto-flush). - Persistent device ID via
flutter_secure_storage, namespaced per instance. UmamiNavigatorObserverfor auto-tracking route pushes, replaces, and pops (routeFilterandrouteNameMapperhooks).- Multi-instance support with isolated SQLite queue and secure storage keys per
instanceName. - Optional REST API client (
enableApi): login, websites, stats, pageviews, metrics, active visitors, events, sessions, teams, users. - Per-call config overrides (
websiteId,hostname,language,userId). - One-time
firstReferrerconsumed by the firsttrackPageView. - Lazy
sessionIdgenerated on firstidentify(). - Configurable
UmamiLogger(six levels, custom sink callback). - Hexagonal architecture: pure-Dart
domainwith swappableportadapters.