Chapter 7

Android attribution and the install referrer

Android gives attribution something iOS does not, a note from the store saying where the install came from.

In short: On Android, Google Play hands the app a referrer URL from the link that led to the install, which makes deterministic attribution possible. It only covers same-session clicks to Google Play, so Meta offers its own Meta Install Referrer for Facebook, Instagram and Audience Network installs, including view-through and multi-session clicks.

What is the Google Play Install Referrer?

The Google Play Install Referrer is an Android API that lets an app securely retrieve, after install, the referrer details Google Play recorded for that install, including the referrer URL and click and install timestamps. An MMP SDK reads it on first launch and uses the values in it to match the install to a click.

It is the main reason Android attribution is more reliable than iOS attribution. A click ID placed in the referrer survives the trip through the store and comes back intact.

How the referrer works

  1. A tracking link sends the person to Google Play with campaign details in the referrer value.
  2. Google Play stores that referrer against the install.
  3. On first launch, the app connects to the Install Referrer service through Google's library.
  4. The app receives the details and sends them to its MMP.
  5. The MMP matches the click details and credits the campaign.

The current library dependency is com.android.installreferrer:installreferrer:2.2. It needs Play Store app version 8.3.73 or later on the device.

What the API returns

MethodWhat it gives you
getInstallReferrer()The referrer URL of the installed package
getReferrerClickTimestampSeconds()When the referrer click happened
getInstallBeginTimestampSeconds()When the install began
getGooglePlayInstantParam()Whether the person used the app's instant experience

The two timestamps are useful beyond attribution. Comparing click time with install begin time helps spot suspicious patterns, a topic covered in ad fraud.

Read it once, read it early: Google says referrer information is available for 90 days and does not change unless the app is reinstalled, and that the API should be called only once, on the first run after install.

Is the Play Install Referrer always available?

No. It only exists for installs from Google Play, and it only covers same-session clicks that lead straight to Google Play. Installs from other Android stores, sideloaded APKs and debug builds installed through adb have no Play referrer.

Other limits to plan for:

  • Response codes: FEATURE_NOT_SUPPORTED means the current Play Store app does not support the API, and SERVICE_UNAVAILABLE means the connection failed. The connection can also drop while the Play Store updates, so the app must reconnect.
  • No view-through: the referrer comes from a click on a link, so an install after an ad view has nothing to carry.
  • No cross-session clicks: if someone clicked, left Google Play and came back later, the referrer may not reflect the earlier click.
  • Stripped values: redirects that drop the referrer value on the way to Google Play break attribution. Google's older documentation lists this as a cause of under-counting.

For installs from third-party Android stores, Google Ads records conversions on first open rather than download.

Meta Install Referrer in plain English

The Meta Install Referrer (often called the Facebook install referrer) is Meta's Android mechanism that lets an app read Meta campaign data for installs that came from Facebook, Instagram or Audience Network ads, including installs the Google Play referrer cannot see.

Put simply, the Play referrer is a note from the store, and the Meta Install Referrer is a note from the Facebook and Instagram apps on the same phone. When someone sees or taps a Meta ad, Meta keeps a record of it in its own apps. When your app opens for the first time, it can ask those apps whether this install followed a Meta ad.

Term: multi-session click-through means someone tapped an ad, left without installing, and installed later. The Play referrer usually loses that click; the Meta Install Referrer can still report it.

How it works, step by step

  1. A person sees or taps an ad on Facebook, Instagram or Audience Network.
  2. They install your app from Google Play, straight away or later.
  3. On first launch, your app (or your MMP's SDK) uses your Facebook App ID to query the Facebook, Instagram or Facebook Lite app on the device.
  4. Those apps return the stored ad data: a timestamp, a click or view flag and encrypted campaign details.
  5. Your MMP decrypts the campaign details with the key from the Meta App Dashboard and credits the right Meta campaign.

What you need to set it up

  • The decryption key from the Meta App Dashboard, added to your MMP, or the campaign data stays unreadable.
  • Your Facebook App ID available to the SDK, usually in AndroidManifest.xml.
  • A recent Facebook or Instagram app on the user's phone: Facebook 428 or later, Instagram 296 or later, or Facebook Lite 411 or later. The data is read from those apps, so a phone without them has nothing to return.
  • An MMP SDK version that supports it, queried on first launch.

As one worked example, Linkrunner's Android SDK reads the Facebook App ID from the manifest (with or without the Facebook SDK installed) and queries Meta on first launch, as its Meta Install Referrer setup guide shows. Other MMPs follow the same pattern with their own SDK versions, so check your vendor's documentation for the minimum version.

Is the Facebook install referrer the same as the Play Install Referrer?

No. The Play Install Referrer comes from Google Play and only covers same-session clicks; the Meta (Facebook) Install Referrer comes from Meta's apps on the device and adds view-through and multi-session click installs from Meta ads.

Meta's comparison is direct:

Google Play Install ReferrerMeta Install Referrer
Same-session click installsYesYes
Multi-session click installsNoYes
View-through installsNoYes
Where the data comes fromGoogle PlayThe Facebook, Instagram and Facebook Lite apps on the device
When to queryFirst run after installFirst launch

The data is read from the Facebook app (version 428 or later), Instagram (296 or later) and Facebook Lite (411 or later). Returned fields include actual_timestamp, an is_ct flag that is 1 for a click and 0 for a view, and an encrypted install_referrer.

Meta data inside the Play referrer

Meta also places encrypted campaign metadata in the utm_content field of the Google Play Install Referrer, encrypted with AES-GCM 256-bit and decrypted with a key from the Meta App Dashboard. Meta says other referrer fields such as utm_source should not be used as a sign that an install came from Facebook.

Decryption key: Both Meta mechanisms return encrypted campaign data. The app owner, or their MMP, needs the key from the Meta App Dashboard to read it, so check that the key is set up in your MMP.

A worked example

A fintech app runs ads on Instagram and Google on Android.

  • Install A: Anna taps a Google App campaign ad and installs straight away. The Play referrer carries Google's details, and the install is matched on first launch.
  • Install B: Jack watches an Instagram video ad but does not tap. Later that day he searches Google Play and installs. The Play referrer has nothing from Meta, but the Meta Install Referrer reports a view, with is_ct set to 0.
  • Install C: Sam taps an Instagram ad, goes to Google Play, leaves, and installs from Google Play the next morning. The Meta Install Referrer can report the earlier click as a multi-session click-through.

Without the Meta Install Referrer, installs B and C could easily look organic in the MMP, even though Meta claims them in its own dashboard. This is one of the most common causes of the Meta and MMP gaps described in self-attributing networks.

How Android compares with iOS

The install referrer is the main reason Android and iOS attribution look so different in the same dashboard.

  • Android: a click ID can travel through Google Play and come back on first open, so most Play installs from tracked clicks can be matched deterministically.
  • iOS: there is no store referrer for a normal App Store install. User-level matching depends on tracking permission, and everything else goes through Apple's aggregated frameworks, covered in iOS ATT and SKAN.

Expect a higher share of user-level attributed installs on Android than on iOS for the same campaign.

Common Android attribution problems

General practice checks, in rough order of how often they cause trouble:

  • SDK reads the referrer late, after a login screen or a crash, so the first open is missed.
  • Referrer read on a later launch, after a long delay.
  • Install from a non-Play store, with no referrer to read.
  • Testing with a debug build installed through adb, which has an empty referrer.
  • Meta decryption key missing in the MMP, so Meta referrer data cannot be read.
  • Facebook App ID missing from the manifest, so the SDK never queries the Meta Install Referrer.
  • Multiple tracking redirects that drop the referrer before Google Play.

For the bigger picture on how a first open becomes a credited install, read how an install gets attributed. Deep links on Android, which use App Links rather than the referrer, are covered in the next chapter.

Questions on this chapter

How long is Play Install Referrer data available?

Google says it is available for 90 days after install and does not change unless the app is reinstalled. Apps should still read it on the first run rather than relying on that period.

Does the Play Install Referrer work for view-through installs?

No. It carries data from a link click that led to Google Play in the same session, so installs after an ad view have no referrer data. Meta's own referrer covers view-through installs from its apps.

Why does my app get an empty referrer when testing?

Debug builds installed through adb do not come from Google Play, so there is no referrer. Test with a build installed from a Play testing track instead.

What is the Facebook install referrer?

It is the common name for the Meta Install Referrer, Meta's Android mechanism for reading Meta ad data from the Facebook, Instagram and Facebook Lite apps on first launch. It lets an MMP credit view-through and multi-session click installs that the Google Play referrer misses.

Do I need both the Google Play and Meta referrers?

If you run Meta ads on Android, reading both gives the most complete picture. The Google Play referrer covers same-session clicks from any source, and the Meta referrer adds Meta's view-through and multi-session installs.

What about installs from other Android app stores?

They have no Google Play referrer. Attribution for those installs depends on store-specific referrers or other link-based matching, which varies by store.