Reputation: 61
I'm going to use Referrer Library
I have read many articles, but none of them tell you how to create a link
for example, I have the code "KSK23DG" What should the link look like so that I can get it in my application?
https://play.google.com/store/apps/details?id=<apppid>...
val response: ReferrerDetails = referrerClient.installReferrer
val referrerUrl: String = response.installReferrer
val referrerClickTime: Long = response.referrerClickTimestampSeconds
val appInstallTime: Long = response.installBeginTimestampSeconds
val instantExperienceLaunched: Boolean = response.googlePlayInstantParam
Upvotes: 6
Views: 6354
Reputation: 6014
Check out my answer here.
You can pass in referrer data with the referrer
URL query parameter:
One of your links could look like this (replace com.example.myapp
with your real application ID):
https://play.google.com/store/apps/details?id=com.example.myapp&referrer=someid%3Dsomedata
This URL consists of the following parts:
https://play.google.com/store/apps/details?id=
com.example.myapp
referrer
URL parameter:
&referrer=
someid
as a key and somedata
as a value (note, that %3D
is the HTML URL enconding for =
):
someid%3Dsomedata
In order to test this, you will need to upload your app to the Play Store into the internal, alpha, beta or production track. As far as I am aware, this does not work with internal app sharing.
Upvotes: 13