For Android and Kotlin

Google Play links and the install referrer for your Android app

Last updated

A Jumper.to link sends Android phones to your app in Google Play with a utm referrer, and iPhones to the App Store. Your app can read the referrer once after install with Google’s Install Referrer library and learn which link and campaign brought the user. Firebase Analytics reads it with no code at all. Samsung and Huawei phones can go to their own stores.

Set it up

  1. Paste your Google Play link. At app.jumper.to/new. Add the App Store, Galaxy Store and AppGallery if you have them.
  2. Make install links per channel. Each one sends its own utm values to Google Play.
  3. Read the referrer on first launch. With the Kotlin function below, or let Firebase Analytics do it.
  4. Compare with taps. Jumper shows taps per link; your analytics shows installs per campaign.

One link for the share sheet: friends on iPhone get the App Store, friends on Android get Google Play.

import android.content.Context
import android.content.Intent
import android.net.Uri

/** Your Jumper link: Google Play on Android, the App Store on iPhone, your site elsewhere. */
const val APP_LINK = "https://oxi.cc/urapp"

fun shareApp(context: Context) {
    val send = Intent(Intent.ACTION_SEND).apply {
        type = "text/plain"
        putExtra(Intent.EXTRA_TEXT, "Get the app: $APP_LINK")
    }
    context.startActivity(Intent.createChooser(send, "Share the app"))
}

fun openLink(context: Context) {
    context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(APP_LINK)))
}

On your app’s page in the dashboard, “Add the social set” makes links for YouTube, TikTok, Instagram, Facebook at once; add others for a newsletter, a poster or an ad. Each is a short random address. When someone taps it, Apple receives ct (channel and campaign, cut to 30 characters) plus your pt, and Google Play receives a referrer with utm_source, utm_medium, utm_campaign and jumper=<link id>. Your app reads the referrer after install, as below.

Read the referrer in Kotlin

Add implementation("com.android.installreferrer:installreferrer:2.2") to your Gradle dependencies, then call this once on first launch. It returns the Jumper link id and campaign, or null when the install did not come from a Jumper link. Google Play keeps the referrer available for about 90 days after the install.

import android.content.Context
import android.net.Uri
import com.android.installreferrer.api.InstallReferrerClient
import com.android.installreferrer.api.InstallReferrerStateListener

data class JumperReferrer(val linkId: String?, val campaign: String?)

/** Reads the Jumper referrer once after install. Calls back with null if there is none. */
fun readJumperReferrer(context: Context, onResult: (JumperReferrer?) -> Unit) {
    val client = InstallReferrerClient.newBuilder(context).build()
    client.startConnection(object : InstallReferrerStateListener {
        override fun onInstallReferrerSetupFinished(code: Int) {
            var result: JumperReferrer? = null
            if (code == InstallReferrerClient.InstallReferrerResponse.OK) {
                // e.g. "utm_source=yt&utm_medium=description&utm_campaign=summer-launch&jumper=lnk_abc123"
                val raw = client.installReferrer.installReferrer
                val query = Uri.parse("https://example.invalid/?$raw")
                val linkId = query.getQueryParameter("jumper")
                if (linkId != null) {
                    result = JumperReferrer(linkId, query.getQueryParameter("utm_campaign"))
                }
            }
            client.endConnection()
            onResult(result)
        }

        override fun onInstallReferrerServiceDisconnected() {}
    })
}

Samsung, Huawei and in-app browsers

Add your Galaxy Store and AppGallery listings and Jumper sends Samsung and Huawei phones there; without them, they get Google Play. Huawei phones without Google services always get AppGallery when you set it. Inside Instagram, Facebook and other apps, Jumper uses an Android intent to open the Play Store app, with the Play web page as the fallback. TikTok blocks that intent, so there the Play link goes to Chrome. Every route keeps the referrer.

Privacy policy, terms and support pages

Both stores ask for a privacy policy link before they accept your app, and Apple also asks for a support link. With Jumper.to you write or paste each page as plain text (or upload a .md file) and get an address like oxi.cc/<your link>/privacy-policy. Pages are text only: headings, lists, tables and links, no images or scripts. Each page uses one credit, like a link. Google Play Console asks for the privacy policy address in the app content section.

What Jumper.to does not do

It does not open your app when it is already installed (that needs Universal Links and App Links on your own domain), it has no deferred deep links, and it does not follow people inside your app. It is a link and its numbers, not an attribution platform.

Make the link for your Android app

Paste your App Store or Google Play link. 3 free credits: each link or page uses one. Nothing to install in your app.

  • 3 free credits: each link or page uses one.
  • Nothing to install in your app
  • No credit card

Start from scratch

Questions

What does Google Play receive?

A referrer with utm_source, utm_medium, utm_campaign, utm_content when set, and jumper=<link id>, URL-encoded and at most 512 characters. Firebase Analytics reads it on its own.

Which library reads the referrer?

Google’s Install Referrer library, com.android.installreferrer:installreferrer. It talks to the Play Store app on the phone and sends nothing to Jumper.

Do I need to add an SDK to my Android app?

No. Jumper.to works on the link only. Nothing ships inside your app, and there is no new release to make. Reading the Google Play referrer is optional and uses Google’s own library.

What happens inside TikTok and Instagram on Android?

Jumper asks Android to open the Play Store app with an intent; inside TikTok, which blocks that, it hands the Play link to Chrome. The referrer travels along either way.

What does it cost?

3 free credits: each link or page uses one. Free credits renew every year. After that: $2 a credit a year, 10 credits for $10, 100 credits for $20. Taps are unlimited and there are no ads.

Will the link open my app if it is already installed?

No. A Jumper link always goes to the store, which shows an “Open” button when the app is installed. Opening a screen in your app needs Universal Links and App Links on your own domain.