Jorn Rigter
Jorn Rigter

Reputation: 1215

Play Install Referrer Library not working in Play Store live app

For our app I recently included the Play Install Referrer Library for getting the referrer link after an app install, following all steps exactly as laid out in this page by Google. We then store it in our database to get an idea of how users find our app.

All works well for when I upload the app from Android Studio. However, when I upload the app to the Play Store, no referrer links are being saved to the database, although the app is being downloaded plenty of times.

Does anyone know what's going wrong here? Any help would be much appreciated.

EDIT: Since today, we're only getting the utm_source=(not%20set)&utm_medium=(not%20set) referrer links. I can see from this post why this is happening, but why are we only getting those links into our database? Since there are many more installs from other sources.

Upvotes: 1

Views: 1722

Answers (1)

Jorn Rigter
Jorn Rigter

Reputation: 1215

It turned out I was using the Campaign Measurement from Analytics at the same time that I wanted to use the Play Install Referrer. Removing the following call from the tutorial solved the issue for me:

// Tracker for Classic GA (call this if you are using Classic GA only)
private void trackInstallReferrer(final String referrerUrl) {
    new Handler(getMainLooper()).post(new Runnable() {
        @Override
        public void run() {
            CampaignTrackingReceiver receiver = new CampaignTrackingReceiver();
            Intent intent = new Intent("com.android.vending.INSTALL_REFERRER");
            intent.putExtra("referrer", referrerUrl);
            receiver.onReceive(getApplicationContext(), intent); // I suspect this line was causing the troubles
        }
    });
}

Upvotes: 0

Related Questions