Instalar receptor de referencia
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
clase final pública
InstallReferrerReceiver
El intent com.android.vending.INSTALL_REFERRER de Google Play se transmite cuando un
se instala desde Google Play Store. Este BroadcastReceiver escucha eso
Intent, pasa los datos de referencia de instalación a GTM para aplicaciones para dispositivos móviles y Google Analytics.
Para habilitar este receptor, agrega lo siguiente al archivo 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>
Este receptor invocará automáticamente al receptor de Google Analytics para configurar la
Datos de la campaña. Si están en uso el SDK de Google Analytics y los SDK de Google Tag Manager
solo este receptor debe estar habilitado.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 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"]]