From nothing to a first attributed event.
Measura matches an install back to the click that caused it, and stores the reasoning: which signal matched, how strong it was, and which candidates it rejected. Other tools return the verdict alone. Here you can audit a number you do not believe.
| Signal | How it matches | Base confidence |
|---|---|---|
install_referrer | Click id carried through the Play Store install | 98 |
meta_referrer | A Facebook or Instagram ad click, read from the same Play record with your Meta key | 98 |
click_id | Click id read from a deep link the SDK opened | 95 |
ad_id | Advertising id matched exactly | 70 |
fingerprint | Device signals score above 0.85 similarity against a same-context report | up to 55 |
organic | No signal matched | n/a |
Tried in that order, first match wins. A deterministic answer is never replaced by an inferred one.
dependencies {
implementation 'dev.measura:measura-sdk:0.1.2'
}Archive under 110 KB gzipped, held there by a build gate. Budget about 312 KB of APK growth in a minified release build, mostly WorkManager and Room. Permissions come through manifest merging.
For an app that must not collect it, for example an app for children, do both of these. Use this init in place of the one in the next section.
Measura.init(this, "msr_...", MeasuraConfig(collectAdvertisingId = false))<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />Create an account to get an API key: msr_ followed by 64 characters, shown once.
package com.example.app
import android.app.Application
import dev.measura.sdk.Measura
import dev.measura.sdk.core.EventType
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Measura.init(this, "msr_your_key_here")
// This SDK version waits for Wi-Fi by default (wifiOnlyMode = true):
// on mobile data, events stay queued until Wi-Fi. To test on mobile
// data, pass a config with wifiOnlyMode = false, or set Upload on to
// Any connection under Integrations > SDK.
}
}
// Then anywhere in your app:
Measura.trackEvent(
EventType.PURCHASE,
mapOf("revenue" to 49.99, "currency" to "USD")
)Replace com.example.app with your app's Kotlin package. Android also needs to start this class. Add this attribute to your existing <application> element inAndroidManifest.xml:
android:name=".MyApplication"If your app already has an Application class, put theMeasura.init call in its onCreate instead, and point android:name to that class.
The install event and first session fire automatically. This setup collects the advertising ID; for the opt-out setup, see Install the SDK.
For consent, initialise normally and call Measura.disableTracking() until the user agrees. The decision takes effect at once, is saved on the device in the background and survives a restart, so events are dropped rather than queued.
Any backend can post signed events directly. Each carries an HMAC-SHA256 signature over a canonical payload, so ingest needs no session. Rules: event ingestion.
Within seconds of an install, a worker searches the app’s attribution window for a click that could have caused it, walking the signals above in order until one matches.
A real install needs the store page, a download and a first open, so it starts well after the click. A click less than 10 seconds before the install, or after it, cannot have caused it: it is the mark of click injection, where malware fires a fake click as an install begins. Such a click gets no credit. It stays in the install's log as a rejected candidate, with the measured seconds, and the install goes to the next candidate or to organic. The check uses Measura's own clock, not the phone's, so a phone with the wrong time cannot trigger it. That clock needs the install to report its own age (age_ms); an install sent without it skips this check. It is also not applied to Play Install Referrer matches, because the referrer is the store's own record of the link and an injected click cannot fake it.
A Facebook or Instagram app-install ad sends people straight to Google Play, so no Measura link is clicked. Play still carries the campaign, ad set and ad, encrypted with your Meta app's Install Referrer Decryption Key. Save that key under Integrations, Ad networks, Meta install referrer, and those installs are credited to the exact ad. Without it the log says a Meta referrer was present but could not be read, rather than calling the install organic without comment.
Every attribution scores 0 to 100. It starts at the base for the signal that matched, then moves on device entropy, click-to-install delta, shared IP, and the fraud pre-screen.
Below 20 it is downgraded to organic. The evidence is kept either way.
Every attribution stores its method, signals, written reason, confidence breakdown, and the candidate clicks it rejected with a reason for each. When an install lands somewhere you did not expect, you see the click that won, the ones that lost, and why. Read it at resource=attribution_log.
| Platform | Status |
|---|---|
| Android | Supported. Play Install Referrer, deep links, offline queue. |
| Server to server | Supported. Post signed events from any backend. |
| iOS | No native SDK currently. Events can be sent server-to-server. |
The native SDK is currently available for Android, and that is where SDK development is focused today: Android carries the strongest signal there is, the Play Install Referrer, which passes a click id through the store install so the match is deterministic. A focused SDK stays small and its offline path properly tested. For anything else, the ingest API accepts signed events from any backend.
Google Play asks every app what it collects. The answers are yours to give, but they have to cover what the SDK does. This is that, read from the SDK source.
| Play data type | What the SDK sends | When |
|---|---|---|
| Device or other IDs | The advertising ID. | By default, unless the person has Limit Ad Tracking on or you set collectAdvertisingId = false. |
| Device or other IDs | Device model, Android version, screen size and user agent, which Measura turns into a matching fingerprint. | Always. It is how an install with no click ID is matched. |
| Device or other IDs | The Firebase Cloud Messaging token, for uninstall detection. | Only if you call setPushToken(). |
| App activity: App interactions | The install, the first session and each event you send, with the properties you attach. | Install and first session always; the rest when you call trackEvent(). |
| Financial info: Purchase history | The revenue amount and currency. | Only on purchase events you send. |
| Personal info: User IDs | Your own user ID and any traits you attach. | Only if you call identify(). |
| App activity: App interactions | The name of the app store that installed your app (for example com.android.vending), and on Android 11 and later the app that opened the installer (for example a browser). | On the install event only, from the next SDK release. |
The installer package is app metadata, not personal data. It is the name of a store or installer app, such as com.android.vending for Google Play, and it says where the app was installed from. It does not identify the person, and it is sent once, with the install. It is not a new kind of data: it sits with the install event that the App activity row above already covers. Confirm the answer against your own Play Console form.
Not collected: location. There is no GPS, no network location and no IP lookup; the country field is the region of the phone's language setting, so en_NG gives NG, and the IP address is cut to its network part (/24 for IPv4, /48 for IPv6) before anything stores it. Nor the Android ID, IMEI, phone number, contacts, messages, photos, files, calendar, health or browsing data. Event properties and identify() traits carry whatever you put in them, so keep names, emails and phone numbers out, or declare them too.
Measura.disableTracking(). The choice survives restarts, and events are dropped, not queued, while it is off.This describes the SDK, not your whole app. Other SDKs you ship add their own answers, and the form is yours to sign.