InstallReferrerReceiver
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
public final class
InstallReferrerReceiver
L'intent com.android.vending.INSTALL_REFERRER Google Play est diffusé lorsqu'un
est installée depuis le Google Play Store. Ce BroadcastReceiver écoute cela.
Intent : transmettre les données de provenance de l'installation à GTM pour les applications mobiles et Google Analytics.
Pour activer ce récepteur, ajoutez le code suivant à votre fichier AndroidManifest.xml:
<!-- Used for install referrer tracking-->
<service android:name="com.google.tagmanager.InstallReferrerService"/>
<receiver
android:name="com.google.tagmanager.InstallReferrerReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
Ce récepteur appelle automatiquement le récepteur Google Analytics pour définir
Données des campagnes. Si vous utilisez le SDK Google Analytics et le SDK Google Tag Manager,
seul ce récepteur doit être activé.
<ph type="x-smartling-placeholder"></ph>
public
InstallReferrerReceiver()
Méthodes publiques
<ph type="x-smartling-placeholder"></ph>
public
vide
onReceive(Contexte Contexte, Intent intent)
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/25 (UTC)."],[],["The `InstallReferrerReceiver` class listens for the `com.android.vending.INSTALL_REFERRER` intent, which is broadcast upon app installation from the Google Play Store. Upon receiving this intent, it passes install referrer data to Google Tag Manager (GTM) and Google Analytics. To enable, it requires a service and a receiver declaration in the `AndroidManifest.xml`, specifying the intent action. The class features a constructor and an `onReceive` method that processes the received intent. It also sets campaign data for the Google Analytics.\n"]]