Using self-hosted Umami for iOS app analytics
8 hours ago
- #Umami
- #iOS Analytics
- #Self-hosting
- The author self-hosts Umami for analytics and developed umami-swift, a lightweight Swift package for iOS app analytics, avoiding third-party data collection and IDFA prompts.
- Apps are registered as websites in Umami with pseudo-domains (e.g., myapp.ios), allowing them to appear alongside websites in the dashboard with real app icons and similar visitor, visit, and view metrics.
- The Swift package sends data directly to Umami's /api/send and /api/batch endpoints, using a rotating in-memory UUID for visitor tracking without storing data on the device, maintaining privacy and compliance.
- Umami.screen() tracks app screens as pageviews, enabling detailed usage insights in the pages list, while Umami.track() logs custom events with optional data, all queued for offline reliability.
- Unlike web tracking, native apps bypass browser ad blockers as traffic is encrypted, though system-wide blockers could block the hostname if listed; self-hosted domains typically avoid block lists.
- A custom Cloudflare Worker serves app icons by replacing DuckDuckGo's favicon service, allowing real icons to display in Umami's dashboard for pseudo-domains, enhancing visual recognition.