Learn how to properly track and attribute mobile app installs. Covers attribution models, platform-specific APIs, privacy considerations, and best practices.
Mobile install attribution is the process of determining which marketing channel, campaign, or user action led to an app installation. It tracks the source of installs and attributes them to specific marketing efforts.
Different attribution models assign credit to marketing touchpoints in different ways. Here are the most common:
Credits the first marketing touchpoint a user encounters. All install credit goes to the first interaction.
Example:
User sees Facebook ad → clicks → waits 3 days → sees Google ad → installs app
Attribution: Facebook gets 100% credit
Best for: Awareness and top-of-funnel campaigns
Limitation: Ignores later touchpoints that may have driven conversion
Credits the last marketing touchpoint before the install. Most common model in mobile marketing.
Example:
User sees Facebook ad → clicks → waits 3 days → sees Google ad → installs app
Attribution: Google gets 100% credit
Best for: Conversion and performance marketing
Limitation: Ignores earlier touchpoints that may have influenced decision
Distributes credit across multiple touchpoints. Can use various weights (linear, time-decay, algorithmic).
Example (Linear):
User sees Facebook ad → clicks → waits 3 days → sees Google ad → installs app
Attribution: Facebook 50%, Google 50%
Best for: Holistic ROI analysis and comprehensive reporting
Limitation: More complex, requires data infrastructure
Gives more credit to touchpoints closer to the install. Earlier interactions receive less credit.
Example:
User sees Facebook ad → clicks → waits 3 days → sees Google ad → installs app
Attribution: Facebook 30%, Google 70%
Best for: Short conversion windows and retargeting
Limitation: May undervalue awareness efforts
The Google Play Referrer API is Google's official method for tracking installs on Android. It captures referral information when a user installs your app from the Google Play Store.
When a user clicks an ad and installs your app, Google Play captures referral information:
{
"referrer": "utm_source=google_play&utm_medium=cpc&utm_campaign=spring_sale",
"referrer_click_timestamp_seconds": 1702000000,
"install_begin_timestamp_seconds": 1702000060,
"install_timestamp_seconds": 1702000120,
"google_play_instant": false
}import com.android.installreferrer.api.InstallReferrerClient
import com.android.installreferrer.api.InstallReferrerStateListener
class AttributionHelper : InstallReferrerStateListener {
private lateinit var referrerClient: InstallReferrerClient
fun getInstallReferrer(context: Context) {
referrerClient = InstallReferrerClient.newBuilder(context).build()
referrerClient.startConnection(this)
}
override fun onInstallReferrerSetupFinished(responseCode: Int) {
when (responseCode) {
InstallReferrerClient.InstallReferrerResponse.OK -> {
val response = referrerClient.installReferrer
val referrerUrl = response.installReferrer
val clickTime = response.referrerClickTimestampSeconds
val installTime = response.installBeginTimestampSeconds
logAttribution(referrerUrl, clickTime, installTime)
}
InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED -> {
// API not available
}
InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE -> {
// Service not available
}
}
referrerClient.endConnection()
}
override fun onInstallReferrerServiceDisconnected() {
// Try again later
}
private fun logAttribution(referrer: String, clickTime: Long, installTime: Long) {
// Send to your backend or attribution service
}
}SKAdNetwork (SKAN) is Apple's privacy-focused attribution framework introduced with iOS 14.5. It replaces IDFA-based tracking with aggregated, privacy-preserving measurement.
import StoreKit
// Configure conversion values
func configureConversionTracking() {
// Update conversion value as user engages with app
if #available(iOS 15.4, *) {
try? updatePostbackConversionValue(
conversionValue: 25, // 0-63 value
coarseValue: .medium, // low, medium, high
lockWindow: false
)
} else if #available(iOS 14.5, *) {
SKAdNetwork.updateConversionValue(25)
}
}
// Report SKAN postback
func reportSKANEvent() {
if #available(iOS 15.1, *) {
Task {
do {
try await requestPostbackOverride()
} catch {
print("SKAN postback override failed: \(error)")
}
}
}
}iOS 14.5+ requires explicit user consent to track activity across apps and websites using IDFA (Identifier for Advertisers).
Google is phasing out third-party cookies and moving toward privacy-preserving measurement:
Different platforms require different attribution approaches. Implement a comprehensive strategy that works across iOS and Android.
Send attribution data to your backend for processing and storage, reducing dependency on client-side tracking.
Consider using services like Redirectly that handle platform-specific APIs and provide unified attribution across iOS and Android.
Regularly audit attribution data for accuracy. Check for discrepancies between app-level and platform-level attribution.
Redirectly makes mobile install attribution simple and privacy-compliant across iOS and Android platforms.