Google Play Install Referrer API vs. INSTALL_REFERRER broadcast
Asked Answered
S

1

23

Recently Google released Google Play Install Referrer API (announcement).

Comparing to the INSTALL_REFERRER broadcast from Google Play, it provides extra information like click and installs time in addition to referrer itself.

First question: is it a complete replacement for INSTALL_REFERRER broadcast? Should we just drop the broadcast receiver and start using a new API?

Second: is there any information in what particular cases new API is more reliable then INSTALL_REFERRER broadcast?

Substitute answered 30/11, 2017 at 10:46 Comment(3)
were you able to find any info at all? I'm looking for a deferred deeplinking, and INSTALL_REFERRER will come-in handy. Not sure how the new API can support that scenario.Aqua
I'd recommend you to use an existing solution for the deferred deep linking. The thing is that INSTALL_REFERRER is not reliable and may not arrive. Check sth like getsocial.im, or Branch they both have deferred deep linking solutions.Substitute
Have you resolved your issue? do you have some working code for this? from what place have you start tracking your first installation? Have you added a broadcast receiver for listening to Intent.ACTION_PACKAGE_FIRST_LAUNCH or just wrote code in mainActivity?Ingather
S
4

It's all about SECURITY and SIMPLICITY. As the doc implies, you can use the Google Play Store's Install Referrer API to securely retrieve more accurate and reliable referral content from Google Play and also you can consider switch to Install Referrer API Client Library to simplify your development process. and as u mentioned in the query it returns ReferrerDetails object that hold extra info related to the install with the below three methods.

ReferrerDetails response = mReferrerClient.getInstallReferrer();
response.getInstallReferrer();
response.getReferrerClickTimestampSeconds();
response.getInstallBeginTimestampSeconds();

The API works only from Play Store version 8.3.73 onwards. Any developers that would like to begin using it can start right away, but a connection must be established between their app and the Play Store.

Also, check an article from Adjust that explains how new API can prevent click injection fraud for mobile ads.

P.S. You need to keep track with the latest API levels to be able to deliver the best solutions to the problems you face in your projects.

Score answered 30/11, 2017 at 11:51 Comment(10)
Have you resolved your issue? do you have some working code for this? from what place have you start tracking your first installation? Have you added a broadcast receiver for listening to Intent.ACTION_PACKAGE_FIRST_LAUNCH or just wrote code in mainActivity?Ingather
You can just implement InstallReferrerStateListener for callbacks. Check this for reference.Score
Hey. I work at Adjust. I second what @AnoopM said. The idea here was to prevent "Click Injection"-- a commonplace adfraud scheme-- and prevent malicious apps from stealing traffic. The linked article is good further readingHautesavoie
since this api is almost impossible to test, can you give examples of how the response.getInstallReferrer(); returns?Oteliaotero
can anyone explain the meaning of "referrer click time"?Madian
@AnoopM I'm using the same implementation but I see installBeginTime and referrerClickTime always same and it is something like 1970-01-18T23:26:26+0000. Any idea why is it taking default time?Bethanybethe
"he API works only from Play Store version 8.3.73 onwards" Does that mean is has to be downloaded from that version of the Play Store (or later) on the users device? Or does it mean that the app has to use Play Services of that version or later?Hundredpercenter
How did you test the new library APIs?Ednaedny
@DarshanPania wher you able to test this with new library API ?Magnetite
@sanjaykm Just add the library and the code and you'll start getting install referrer info even for manual install on emulator or test deviceEdnaedny

© 2022 - 2024 — McMap. All rights reserved.