App analytics
Mayfly measures apps as well as websites, side by side in All sites. Apps send events with Aptabase’s open-source SDKs, pointed at Mayfly. No user ids, no device ids, nothing that lasts longer than a day.
Add an app
Choose Add a site, then App, and give it the name you call it. Mayfly creates an app key and opens Install with the setup for your platform. An app counts as one site on your plan, the same as a website.
The key starts with A-SH-. It can only send events to that one app and can’t read anything, so it is fine to ship inside the app.
Point the SDK at Mayfly
Mayfly speaks the Aptabase protocol, so every Aptabase SDK works once its host is set to Mayfly: Swift (iOS, iPadOS, macOS, watchOS, tvOS, visionOS), Android, Flutter, React Native, Electron, Tauri and the web SDK for web apps. Install shows the code for each with your key filled in. For Swift:
// Xcode: File › Add Package Dependencies…, paste the URL below.
// Package.swift:
.package(url: "https://github.com/aptabase/aptabase-swift.git", from: "0.4.0")import Aptabase
// In your App's init() or application(_:didFinishLaunchingWithOptions:)
Aptabase.shared.initialize(
appKey: "A-SH-YOUR_APP_KEY_FROM_INSTALL",
with: InitOptions(host: "https://getmayfly.com")
)Aptabase.shared.trackEvent("app_started")
Aptabase.shared.trackEvent("develop_started", with: ["source": "roll", "frames": 12])For Android:
import com.aptabase.Aptabase
import com.aptabase.InitOptions
Aptabase.instance.initialize(
applicationContext,
"A-SH-YOUR_APP_KEY_FROM_INSTALL",
InitOptions(host = "https://getmayfly.com")
)Debug builds
SDKs mark events from debug builds. Mayfly never counts them: it shows the last 20 on Install for a day, so you can watch the first events arrive while you wire it up, and keeps them out of every report. Release builds send about once a minute and when the app goes to the background.
Events and properties
- Event names are up to 60 characters. Keep them stable, like
develop_started: each name becomes a row, a goal and a funnel step. - Up to 24 properties per event. Values are cut to 255 characters. Keys like
emailoruser_id, and values that look like emails or tokens, are dropped on arrival. - Never send photos, file names, locations or text a person typed.
Goals and funnels work on app events the same way as on a website’s custom events. See Goals and custom events.
Revenue
Add revenue in major units, the price as the store reports it (4.99), and a three-letter currency to any event:
Aptabase.shared.trackEvent("purchase", with: ["revenue": 4.99, "currency": "USD", "plan": "pro_yearly"])Mayfly stores it as money on that event, and the two properties are not kept as ordinary properties. This differs from the website script, which takes minor units.
What the reports show
- Overview: daily users (the average per day), sessions, events, session length and events per session, against the previous period. Then events, app versions, operating systems, devices, countries and languages. Every row is a filter; filter to one event to see its properties and their most common values.
- Version adoption: each day’s users split by version, so you can see how fast a release is taken up.
- Live: people who sent an event in the last five minutes and the last thing they did.
- MCP: an AI client connected with the app’s key gets app tools. See AI tools (MCP).
Privacy, and what it rules out
Each event carries its name and properties, the time, the app version and build, the OS and version, the device model and the language. The SDKs send no user or device identifier. Mayfly makes a daily user from a salted hash of the network address and the device description; the address is discarded and the salt changes every day.
So Mayfly cannot follow one person from one day to the next. That is the point, and it is why there is no retention cohort or lifetime value. App Store Connect’s privacy questions: Usage Data, Product Interaction, used for analytics, not linked to the user, not used for tracking. See What Mayfly measures.
Something here doesn’t match what you see? Write to kirylapps@gmail.com.