gpt4 book ai didi

ios - 分析事件未记录到 Firebase

转载 作者:可可西里 更新时间:2023-11-01 03:27:58 25 4
gpt4 key购买 nike

我正在尝试将简单的分析事件记录到 Firebase,但从未在线显示任何内容。

这是我记录事件的方式:

    FIRAnalytics.logEventWithName("spot_view", parameters: [
"spot_name": spotName,
"is_private": isPrivate
])

我打开了运行时参数以查看 Firebase 输出,我得到了这个:

<FIRAnalytics/DEBUG> Event logged. Event name, event params: spot_view, {
"_o" = app;
"is_private" = 1;
"spot_name" = TestLogSpotView;
}

所以事件正在被触发。我也得到这个表明数据实际上正在上传:

2016-06-09 12:12:13.567 [60279:] <FIRAnalytics/DEBUG> Measurement data sent to network. Timestamp (ms), data: 1465488733550, <ACPMeasurementBatch 0x7de7bb60>: {
bundles {
protocol_version: 1
events {
params {
name: "_c"
int_value: 1
}
params {
name: "_o"
string_value: "auto"
}
name: "_f"
timestamp_millis: 1465488710347
}
events {
params {
name: "_et"
int_value: 1
}
params {
name: "_o"
string_value: "auto"
}
name: "_e"
timestamp_millis: 1465488710347
}
events {
params {
name: "_o"
string_value: "app"
}
params {
name: "is_private"
int_value: 1
}
params {
name: "spot_name"
string_value: "TestLogSpotView"
}
name: "spot_view"
timestamp_millis: 1465488710411
}
events {
params {
name: "content_type"
string_value: "cont"
}
params {
name: "_o"
string_value: "app"
}
params {
name: "item_id"
string_value: "1"
}
name: "select_content"
timestamp_millis: 1465488710411
}
user_attributes {
set_timestamp_millis: 1465488710347
name: "_fot"
int_value: 1465491600000
}
upload_timestamp_millis: 1465488733550
start_timestamp_millis: 1465488710347
end_timestamp_millis: 1465488710411
platform: "ios"
os_version: "9.3"
device_model: "x86_64"
user_default_language: "en-us"
time_zone_offset_minutes: -240
app_store: "manual_install"
app_id: “——“
app_version: "0.0.0"
gmp_version: 3200
uploading_gmp_version: 3200
resettable_device_id: “—“——
limited_ad_tracking: false
app_instance_id: “———“
bundle_sequential_index: 1
gmp_app_id: “———“
firebase_instance_id: “———“
app_version_major: 106
}
}
2016-06-09 12:12:13.568[60279:] <FIRAnalytics/DEBUG> Uploading data. Host: https://app-measurement.com/a
2016-06-09 12:12:13.595[60279:] <FIRAnalytics/DEBUG> Received SSL challenge for host. Host: https://app-measurement.com/a
2016-06-09 12:12:13.731[60279:] <FIRAnalytics/DEBUG> Successful upload. Got network response. Code, size: 204, 0

几天前我运行了同样的代码,但 Firebase 中仍然没有显示任何内容。

我还尝试记录一个直接从 Firebase 复制的事件,它是这样的:

    FIRAnalytics.logEventWithName(kFIREventSelectContent, parameters: [
kFIRParameterContentType:"cont",
kFIRParameterItemID:"1"
])

您可以在上面发布的日志控制台输出中看到。

我认为唯一错误的地方是 GoogleService-Info.plist。 IS_ANALYTICS_ENABLED 有一个条目设置为 no。我只是将其切换为 YES 并打算再试一次,尽管我认为这不是解决方法。我认为此条目仅适用于 Google Analytics。

enter image description here


此外,设备类型和用户 session 等其他数据也会被记录。所以它只是记录不起作用的事件。

最佳答案

这可能是自定义事件的原因之一

 Event name must contain only letters, numbers, or underscores. 

我的事件没有记录,因为我在事件名称中使用了空格。

关于ios - 分析事件未记录到 Firebase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37731420/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com