Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
lezione finale pubblica
InstallReferrerReceiver
L'intent com.android.vending.INSTALL_REFERRER di Google Play viene trasmesso quando
sia installata dal Google Play Store. Questo BroadcastRicevir è in ascolto
Intento, trasmettere i dati del referrer per le installazioni a GTM per le app per dispositivi mobili e Google Analytics.
Per abilitare questo ricevitore, aggiungi quanto segue al file 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>
Questo destinatario richiama automaticamente il ricevitore Google Analytics per impostare il
Dati della campagna. Se sono in uso sia l'SDK di Google Analytics sia l'SDK Google Tag Manager,
solo questo ricevitore
deve essere abilitato.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2024-08-22 UTC."],[[["`InstallReferrerReceiver` processes install referrer data from the Google Play Store and sends it to Google Tag Manager and Google Analytics."],["To enable this functionality, you need to add the provided service and receiver entries to your `AndroidManifest.xml` file."],["This receiver automatically triggers the Google Analytics receiver for campaign data, eliminating the need for separate configuration when using both Google Analytics and Google Tag Manager SDKs."]]],["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"]]