Short answer: Put your UTMs inside a single
referrerparameter on the Play Store link, URL-encoded, for examplehttps://play.google.com/store/apps/details?id=com.example.app&referrer=utm_source%3Dnewsletter%26utm_medium%3Demail. After install, read that string on the first app open with Google's Play Install Referrer Library; the same string you put inreferrercomes back, and it stays available for 90 days. UTMs get lost when a redirect rewrites the link, when a network strips non-encrypted parameters, or when the install happens outside Google Play. iOS has no equivalent, which is why an MMP's tracking link is the usual way to do this across both stores.
UTMs work on the web because the browser carries them to the landing page. A Play Store install breaks that chain: the user lands on a store listing, installs, and opens an app that has never seen the URL. If you append ?utm_source=... straight to a Play link, nothing in your app reads it.
Google built one channel for this, the referrer parameter, and one API to read it back. Here is how to use both, where they fail, and what to do on iOS.
How does the Google Play referrer parameter work?
The Google Play referrer parameter is a free-text string on a Play Store link that Google Play stores against the install and hands back to the app through the Install Referrer API. Your UTMs go inside it.
- UTM parameters (
utm_source,utm_medium,utm_campaign,utm_term,utm_content) are a naming convention, not a Play feature. Play does not parse them; it just returns your string. - The Google Play Install Referrer is the API that returns that string, plus the click and install timestamps.
- Google's Install Referrer integration guide shows the link format,
idfor the package name andreferrerfor "a string representing the referral source", and says the response carries "the same string passed into thereferrerquery param".
Step 1: Build the Play Store link with a referrer
- Start from the store listing URL. Google's linking guide gives the format
https://play.google.com/store/apps/details?id=<package_name>. - Write your UTMs as one string. For example
utm_source=newsletter&utm_medium=email&utm_campaign=diwali_sale. Keep the naming consistent; our post on UTM naming conventions that scale covers lowercase rules and source lists. - URL-encode that string. The
&and=inside your UTMs would otherwise be read as new parameters of the store URL, and only the first UTM would survive. Encoded,=becomes%3Dand&becomes%26. - Append it as
referrer. The final link:
https://play.google.com/store/apps/details?id=com.example.app&referrer=utm_source%3Dnewsletter%26utm_medium%3Demail%26utm_campaign%3Ddiwali_sale
Our free UTM builder generates consistent UTM strings; encode the result before you place it inside referrer.
Step 2: Read the referrer with the Play Install Referrer API
On the first launch after install, connect to the Play Store app, call getInstallReferrer(), and read installReferrer. That returns the decoded string you set in Step 1.
Add Google's library, as listed in the Play Install Referrer Library guide:
dependencies {
implementation("com.android.installreferrer:installreferrer:2.2")
}
Then connect, read and close. The connection and ReferrerDetails calls below follow Google's sample; the UTM parsing at the end is our addition.
val referrerClient = InstallReferrerClient.newBuilder(this).build()
referrerClient.startConnection(object : InstallReferrerStateListener {
override fun onInstallReferrerSetupFinished(responseCode: Int) {
when (responseCode) {
InstallReferrerResponse.OK -> {
val response: ReferrerDetails = referrerClient.installReferrer
val referrerUrl: String = response.installReferrer
val clickTime: Long = response.referrerClickTimestampSeconds
val installTime: Long = response.installBeginTimestampSeconds
// e.g. "utm_source=newsletter&utm_medium=email&utm_campaign=diwali_sale"
val utms = referrerUrl.split("&").mapNotNull { pair ->
val parts = pair.split("=", limit = 2)
if (parts.size == 2) parts[0] to parts[1] else null
}.toMap()
// Send utms, clickTime and installTime with your install event
referrerClient.endConnection()
}
InstallReferrerResponse.FEATURE_NOT_SUPPORTED -> {
// API not available on the current Play Store app
}
InstallReferrerResponse.SERVICE_UNAVAILABLE -> {
// Connection could not be established; retry later
}
}
}
override fun onInstallReferrerServiceDisconnected() {
// Call startConnection() again before the next request
}
})
Rules from Google's documentation worth following:
- Call it once. Google says the referrer "is available for 90 days and doesn't change unless the app is reinstalled", so invoke the API only on the first run after install and store the result.
- Close the connection with
endConnection()to avoid leaks. - Handle disconnects. The Play Store service can update in the background; call
startConnection()again if it drops. - Keep the timestamps. The API overview returns the click time and install-begin time as well as the referrer, which helps spot installs that arrive suspiciously fast after a click.
Where do UTMs get lost on the way to the install?
Most lost UTMs are not a Play bug. The parameters fall off before the user reaches the store, or the install happens somewhere the referrer cannot follow.
- Unencoded referrers. The most common mistake. Only
utm_sourcesurvives, because the store URL treats&utm_medium=as its own parameter. - Redirect chains. A link shortener, a landing page or a "download" button that rebuilds the Play URL without copying the query string drops the referrer. Test every hop.
- Web-to-app journeys. UTMs on your landing page are not on the Play link unless your page copies them into
referrer. Same problem as UTMs through payment redirects, with a store in place of a gateway. - In-app browsers. Links opened inside social apps run in an embedded browser rather than Chrome, and some hand off to the store differently. Test your link from inside each app you advertise on.
- Ad networks that set their own referrer. Meta's install referrer documentation says parameters outside its encrypted campaign data, "such as
utm_source, are not guaranteed to be included". Use Meta Install Referrer for Meta installs instead. - Installs outside Google Play. The API is exposed by the Play Store app, so sideloads and other app stores return nothing.
- Reading it late. After 90 days the referrer is gone; an app that reads it only on a later screen can miss users who churn before reaching it.
What about iOS?
The App Store has no referrer equivalent that reaches your app. Apple's campaign links add a provider token (pt) and campaign token (ct) to App Store URLs, but the results appear as aggregated metrics in App Store Connect analytics, and a campaign only shows once at least five individual users have downloaded through it. Nothing is returned to your app per install. On iOS, install-level campaign data comes from click IDs, deep links and an MMP's tracking link instead.
How does an MMP pass UTMs automatically?
An MMP replaces the hand-built Play link with a tracking link. The click, its UTMs and its click ID are recorded at click time, and the SDK matches the install back to that click on first open.
- You create one tracking link per campaign, with UTMs or channel fields set once.
- The link records the click, then sends the user to the right store or into the app if it is already installed.
- On Android, the SDK reads the Play Install Referrer on first launch and matches the install to the click deterministically, with timestamps.
- On iOS, the same link uses click IDs, deep link data and, for Apple Ads, Apple's AdServices token.
- Every later event (sign-up, purchase) carries the same source and campaign, so the UTM report becomes a revenue report.
Linkrunner works this way. Every link is a deferred deep link by default, the SDK reads the Play Install Referrer deterministically, and links opened in Instagram, Threads, Facebook, TikTok, LinkedIn, X and Snapchat get an automatic intermediary page so the hand-off from the in-app browser to the store is handled for you. The setup is in create a trackable link, and the SDK side is covered in our Android attribution SDK setup guide.
How to test your setup
- Uninstall the app from a test Android device.
- Click your link from the same place users will (email, Instagram, a landing page).
- Install from Google Play and open the app.
- Check that the install event carries every UTM, not only
utm_source. - Repeat from inside each in-app browser you advertise in.
FAQ
Can I add UTM parameters directly to a Google Play link?
Not as separate parameters. Put them inside one URL-encoded referrer parameter, because that is the only value Google Play passes back to the app through the Install Referrer API.
How long is the Google Play install referrer available?
Google says the referrer information is available for 90 days and does not change unless the app is reinstalled. Read it once on the first launch and store it.
Does the App Store support UTM parameters?
Not in a way your app can read. Apple's campaign links report aggregated downloads in App Store Connect analytics, with a minimum of five users per campaign, so install-level source data on iOS needs click IDs or an MMP.
Why do I only see utm_source in my referrer?
The referrer value was not URL-encoded. The & before utm_medium ended the referrer parameter, so everything after it was read as part of the store URL instead.
The takeaway
On Android, UTMs reach the install through exactly one door: an encoded referrer on the Play link, read once with the Install Referrer API. Protect that string through every redirect and in-app browser, and accept that iOS needs a different route entirely. To get both stores from one tracking link, request a demo from Linkrunner, then run the five-step test above on your busiest campaign link.
