Set up your target Google Play app

I launch Google Play as follows:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.example"));                                                           
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(intent);

I would like to include the referrer data as described here: https://developers.google.com/analytics/devguides/collection/android/devguide#google-play-builder Unfortunately, it generates a URL that leads to the web google play website What is equivalent to intention? I would be grateful for the source code for the sample.

Thank.

+5
source share
2 answers

Adding referrer data to links on Google Play works the same for links in the application, as it does for the Internet:

You can add referrer data using a parameter referrerin your market URI, i.e.:

market://details?id=com.example&referrer=utm_source%3Dmyapp%26utm_medium%3Dcross-sell

, , Google Play referrer, , com.android.vending.INSTALL_REFERRER .

, , - Google Play Store.

+2

, , . , .

<receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver" android:exported="true">
  <intent-filter>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>
</receiver>

-1

All Articles