当前,我们在iOS应用中使用Firebase。
我很好奇是否有可能(并且有效)禁用自动报告(使用FirebaseScreenReportingEnable
)和手动调用Analytics.logEvent
(具有必需的参数)。
行中的内容
Analytics.logEvent("screen_view", parameters: [
"firebase_event_origin": "auto",
"firebase_previous_class": "PrevClass",
"firebase_previous_id": "1",
"firebase_previous_screen": "PrevScreen",
"firebase_screen": "NewScreen",
"firebase_screen_class": "NewClass",
"firebase_screen_id": "2",
])
答案 0 :(得分:-1)
您无法手动触发screen_view事件。但是,您可以通过在目标plist中添加以下键来禁用自动屏幕录制;
<key>FirebaseScreenReportingEnabled</key>
<false/>
并使用自定义事件名称将Manuel报告发送到Firebase;
func sendScreenDataToGA(screenName: String) {
Analytics.logEvent("screen_tracking_view", parameters: [
"screen_name": screenName
])
}
答案 1 :(得分:-1)
您可以通过致电setScreenName()
track screens by explicit calls:
Analytics.setScreenName(screenName, screenClass: screenClass)