firebase - 使用 logEvent 时无法在 Firebase 分析中获取项目数组
问题描述
根据这个firebase文档,我在网络上使用firebase logEvent函数
我做了什么首先,我初始化了firebase
var firebaseConfig = {
apiKey: "Xxxxxxxxx",
authDomain: "Xxxxxxxxx",
projectId: "Xxxxxxxxx",
storageBucket: "Xxxxxxxxx",
messagingSenderId: "Xxxxxxxxx",
appId: "Xxxxxxxxx",
measurementId: "Xxxxxxxxx"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
然后我使用日志事件方法,就像网站上显示的示例一样
analytics.logEvent('select_content', {
content_type: 'image',
content_id: 'P12453',
items: [{ name: 'Kittens' }]
});
在 Firebase 分析仪表板上,我收到以下参数
content_id
content_type
debug_mode
engagement_time_msec
ga_session_id
ga_session_number
origin
page_location
page_title
但我找不到项目如何找到我的项目参数?谢谢
解决方案
我问了firebase支持,他们给了我答案
似乎您尝试将 ITEMS 参数用于 select_content 事件。请注意,这是不可能的,因为您只能对所有预定义的电子商务事件使用 ITEMS 参数。
因此,您需要遵循有关设置预定义电子商务事件的文档,链接在这里。
推荐阅读
- tensorflow - Tensorflow连接层无法识别输入列表
- c - 当 C 库静态链接时,整个库是否会添加到可执行文件中?
- kubernetes - 在 VSTS 中创建 Kubernetes Endpoint 会产生错误
- java - Bean单例,会话创建和初始化
- javascript - TypeError: $.ajax is not a function work fine in one page but not in another page
- spring - 必须在事务上下文之外调用方法 - Spring @Transactional
- python-3.x - AWS Lambda Python PIL/枕头导入错误
- android - 返回到 SslErrorHandler 上的上一个屏幕
- html - 带有角度的表单验证:如何显示不同无效案例的特定错误?
- sql-server - 获取 varchar 列 SQL Server 中的最大数量