Skip to content
GitHubGet started

Deterministic attribution

Flutter SDK

The signals that name the exact click without a fingerprint, including Play and OEM store referrers, Meta's on-device referrer, the iOS pasteboard read, DectogPasteButton and the Apple Search Ads token.

A deterministic signal carries the click id itself, so the server can credit the exact click regardless of IP changes, shared networks or time elapsed. When DecTog sends a visitor to a store it tags the store URL: Google Play and the OEM stores get referrer=dtg_click={id}&dtg_l={username}/{slug} (one URL-encoded value), and the App Store gets ct=dtg_click={id}. The SDK reads these signals back on the first launch and sends them with the install registration. A verdict built from one of them has matchConfidence: 'guaranteed'.

The dtg_l tag names the link, so the server can still attribute the install when the web click row never landed (for example a browser that never retried the client-hints redirect): it synthesizes the click from the referrer.

The plugin reads every store’s install referrer natively, in parallel, on the first launch. The registration waits at most installReferrerTimeout (default 5 seconds; the native side clamps the value to 500 ms to 60 seconds) and then ships with whatever arrived.

Store referrerSource Reader Needs
Google Play google_play com.android.installreferrer:installreferrer:2.2, bundled nothing
Huawei AppGallery huawei AppGallery’s content provider nothing (the plugin manifest declares the permission and the provider query)
vivo app store vivo the vivo referrer provider nothing
Samsung Galaxy Store samsung Samsung’s client library, reached by reflection, capped at 2 seconds the host app adds store.galaxy.samsung.installreferrer:samsung_galaxystore_install_referrer:4.0.0
Xiaomi GetApps xiaomi Xiaomi’s client library, reached by reflection, capped at 3 seconds the host app adds com.miui.referrer:homereferrer:1.0.0.7

DectogCollection.oemReferrers (on by default, or as the dashboard sets it) controls whether the four OEM readers run at all; a collect set without it reads Google Play only.

Play retries. The Play reader makes up to three connection attempts 3 seconds apart on the transient responses (SERVICE_UNAVAILABLE, SERVICE_DISCONNECTED, DEVELOPER_ERROR), with a 5-second watchdog per attempt so a service that never calls back cannot hang the read. FEATURE_NOT_SUPPORTED, PERMISSION_ERROR, a missing Play Store and Play’s own organic marker (utm_source=google-play&utm_medium=organic) are definitive answers.

Winner. Among stores that returned a non-empty, non-organic referrer, the one whose install began last wins; Google Play wins ties. The verdict’s referrerSource names it.

Both clocks. Play’s device-clock and server-side click and install-begin timestamps are both sent (referrer_click_ts, install_begin_ts, referrer_click_server_ts, install_begin_server_ts). The server’s fraud timing trusts only the server pair.

Statuses. Every read reports a status that the server stores as referrer_status:

Status Meaning Re-read later?
ok A non-empty referrer was read no
organic The store answered but recorded no referrer no
feature_not_supported The store app is too old for the API no
permission_error The store refused the read no
developer_error The store rejected the call after every retry no
not_available The store, its library or its provider is absent no
not_android Not an Android device no
service_unavailable No connection after every retry yes
timeout Still running when the deadline passed yes
error Anything else yes

Late delivery. When the registration shipped before the read finished, the SDK keeps waiting in the background and sends the result as a late claim (claim_source: late_referrer) in the same process. A non-definitive status is re-read on up to five later launches. The sentinel marks the referrer as delivered only after the server acknowledged the claim. An upgraded verdict is re-emitted on onAppInstalled; see Install attribution.

Custom source. installReferrerProvider replaces the built-in readers with your own callback returning the raw Play referrer string (or null). It is a string only: no timestamps, no OEM stores, and an empty value or Play’s organic marker counts as organic. Use it only when another SDK already owns the referrer read.

The Facebook App ID enables this read: the one saved on the dashboard’s Apps page, which the SDK reads at start-up, or DectogConfig.fbAppId, which takes precedence. With the ID set to your Facebook App ID (digits only), the plugin queries the install-referrer content providers of the Facebook, Instagram and Facebook Lite apps for that app id and sends what they recorded as meta_referrer, with Meta’s timestamp and its click-through flag (meta_referrer_is_ct). When the recorded referrer carries dtg_click, the server credits that click with matchSource: 'referrer' and referrerSource: 'meta'. The read has a 1.5-second budget and runs only on Android; iOS has no equivalent.

Meta’s referrer earns credit only while its click is recent: 7 days by default, set per app as the Pasted-link and Meta window on the Apps page. An older one opens the link’s content (routing) but the install counts as organic with the flag stale_meta.

The pasteboard read defaults to off on Android, where the Play referrer is already deterministic and Android 12 and newer shows a “pasted from your clipboard” notice on every read. A collect set with DectogCollection.pasteboard forces the read: a description-only check first (the clip must be textual and not flagged sensitive), then the first clip item is accepted when it is a single token of at most 2048 characters with a valid scheme (http(s) needs a host, a custom scheme needs ://). Everything else is the same as on iOS.

A pasted link, whether read on the first launch or through DectogPasteButton, earns credit only while its click is recent: 7 days by default, set per app as the Pasted-link and Meta window on the Apps page (1 to 720 hours). A link copied weeks ago, or re-shared as text, still opens its content in the app through routing, but the install counts as organic with the flag stale_clipboard; with strict fraud mode on it does neither. A late paste of such a link answers claim: rejected, claimReason: stale_click. Store referrers are not limited this way.