Firebase未记录安装引荐来源网址

时间:2019-04-09 17:17:15

标签: android firebase react-native firebase-analytics

我正在尝试将安装属性添加到R​​eact Native android应用中。我相信我可以在开发人员模式下正确触发该事件,但实际上在Firebase调试日志或转换中看不到该事件。我可以看到其他分析事件,而不仅仅是这个。

我将此添加到了src/main/AndroidManifest.xml

<receiver android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
    android:permission="android.permission.INSTALL_PACKAGES"
    android:enabled="true">
    <intent-filter>
        <action android:name="com.android.vending.INSTALL_REFERRER"/>
    </intent-filter>
</receiver>

观看日志:

$ adb shell setprop log.tag.FA VERBOSE
$ adb shell setprop log.tag.FA-SVC VERBOSE
$ adb logcat -v time -s FA FA-SVC

广播消息:

$ adb shell am broadcast -a com.android.vending.INSTALL_REFERRER -n com.example/com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver --es "referrer" "utm_source=medium&utm_medium=test&utm_content=reactnativetest&utm_campaign=reactnativetest"

日志似乎显示“上传成功”:

04-09 11:05:04.314 V/FA      ( 7426): Local receiver got: com.android.vending.INSTALL_REFERRER
04-09 11:05:04.315 I/FA      ( 7426): Install referrer extras are: utm_source=medium
04-09 11:05:04.317 W/FA      ( 7426): Install referrer is missing timestamp
04-09 11:05:04.318 I/FA      ( 7426): Install Referrer Reporter is initializing
04-09 11:05:04.325 I/FA      ( 7426): Install Referrer Service is: available
04-09 11:05:04.330 V/FA      ( 7426): Install campaign recorded
04-09 11:05:04.338 D/FA      ( 7426): Logging event (FE): firebase_campaign(_cmp), Bundle[{click_timestamp=1554755627203, source=medium, firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=1234512345123451234, campaign_info_source(_cis)=referrer broadcast}]
04-09 11:05:04.362 V/FA      ( 7426): Connecting to remote service
04-09 11:05:04.373 D/FA      ( 7426): Connected to remote service
04-09 11:05:04.373 V/FA      ( 7426): Processing queued up service tasks: 1
04-09 11:05:04.388 V/FA-SVC  ( 8508): Logging event: origin=auto,name=firebase_campaign(_cmp),params=Bundle[{click_timestamp=1554755627203, source=medium, firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=1234512345123451234, campaign_info_source(_cis)=referrer broadcast}]
04-09 11:05:04.397 V/FA-SVC  ( 8508): Saving event, name, data size: firebase_campaign(_cmp), 147
04-09 11:05:04.398 V/FA-SVC  ( 8508): Event recorded: Event{appId='com.example', name='firebase_campaign(_cmp)', params=Bundle[{click_timestamp=1554755627203, source=medium, firebase_event_origin(_o)=auto, _r=1, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=1234512345123451234, campaign_info_source(_cis)=referrer broadcast, _dbg=1}]}
04-09 11:05:04.399 V/FA-SVC  ( 8508): Upload scheduled in approximately ms: 500
04-09 11:05:04.400 V/FA-SVC  ( 8508): Cancelling job. JobID: 812057698
04-09 11:05:04.403 V/FA-SVC  ( 8508): Scheduling upload with DelayedRunnable
04-09 11:05:04.404 V/FA-SVC  ( 8508): Scheduling upload with GcmTaskService
04-09 11:05:04.404 V/FA-SVC  ( 8508): Scheduling task with Gcm. time: 500
04-09 11:05:04.409 V/FA-SVC  ( 8508): Background event processing time, ms: 21
04-09 11:05:04.662 I/FA      ( 7426): Install Referrer Service connected
04-09 11:05:04.679 E/FA      ( 7426): Service response is missing Install Referrer install timestamp
04-09 11:05:04.907 V/FA-SVC  ( 8508): Cancelling job. JobID: 812057698
04-09 11:05:04.910 V/FA-SVC  ( 8508): Starting upload from DelayedRunnable
04-09 11:05:04.918 V/FA-SVC  ( 8508): Saving bundle, size: 505
04-09 11:05:04.919 D/FA-SVC  ( 8508): Uploading events. Elapsed time since last upload attempt (ms): 512
04-09 11:05:04.921 V/FA-SVC  ( 8508): Uploading data. app, uncompressed size, data: com.example, 546,
...
04-09 11:05:04.921 V/FA-SVC  ( 8508): Not stopping services. fetch, network, upload: false, true, false
04-09 11:05:04.923 V/FA-SVC  ( 8508): Uploading data. size: 519
04-09 11:05:05.149 V/FA-SVC  ( 8508): Upload scheduled in approximately ms: 3599995
04-09 11:05:05.151 V/FA-SVC  ( 8508): Cancelling job. JobID: 812057698
04-09 11:05:05.157 V/FA-SVC  ( 8508): Scheduling upload with GcmTaskService
04-09 11:05:05.157 V/FA-SVC  ( 8508): Scheduling task with Gcm. time: 3599995
04-09 11:05:05.160 V/FA-SVC  ( 8508): Successful upload. Got network response. code, size: 204, 0
04-09 11:05:05.164 V/FA-SVC  ( 8508): Nothing to upload or uploading impossible
04-09 11:05:05.165 V/FA-SVC  ( 8508): Cancelling job. JobID: 812057698
04-09 11:05:05.169 V/FA-SVC  ( 8508): Stopping uploading service(s)

在Firebase中的“转化”下,我看到first_open设置为“标记为转化”。但是,数据仅显示google-play(direct)google作为来源。

此外,当我打开Firebase DebugView时,我可以看到“ screen_view”和“ user_engagement”事件,但与引荐来源的内容无关。

我不确定是什么问题-它需要成为Google广告系列吗? (最终,我想跟踪Facebook广告系列。)还是需要从Play商店中安装它?还是还有其他我想念的东西?

0 个答案:

没有答案