InstallReferrerReceiver

公共最终类 InstallReferrerReceiver

当发生以下情况时,系统会广播 Google Play com.android.vending.INSTALL_REFERRER intent: 应用是从 Google Play 商店安装的。这个 BroadcastReceiver 会监听 Intent,将安装引荐来源数据传递到 GTM,以用于移动应用和 Google Analytics。

如需启用此接收器,请将以下内容添加到 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>
 
 
此接收器会自动调用 Google Analytics 接收器,以便设置 广告系列数据。如果同时使用了 Google Analytics SDK 和 Google 跟踪代码管理器 SDK, 只需启用此接收器即可。

公共构造函数摘要

公共方法摘要

无效
onReceive(Context context, Intent intent)

公共构造函数

<ph type="x-smartling-placeholder"></ph> 公开 InstallReferrerReceiver ()

公共方法

<ph type="x-smartling-placeholder"></ph> 公开 无效 onReceive 上下文上下文intent 意图