针对Firebase和Google Analytics的google-services.json [英] google-services.json for Firebase and Google Analytics
问题描述
我想在我的项目中使用Google Analytics和Firebase。我已经从Firebase控制台设置下载了google-services.json文件,但是在使用之后,我无法支持Google Analytics(分析)。它显示错误:
$ p $ 错误:(463,49)错误:找不到符号变量global_tracker
如何在相同的.json文件中进行配置?
services:{
analytics_service:{
status:2,
analytics_property:{
tracking_id:some_tracking_id
}
},
$ c $当我下载了 google-services.json
$ div> > from Firebase console, analytics-service
看起来像这样: analytics_service:{
status:1
},
因为我已经按照这里的指示配置了Google Analytics(分析),使用 global_tracker.xml
文件,似乎没有必要在 google-services.json
中配置它。
I want to use Google Analytics and Firebase both in my project. I have downloaded google-services.json file from the Firebase console settings but after using it, I am not able to support Google Analytics. It is showing me the error:
Error:(463, 49) error: cannot find symbol variable global_tracker
How to configure both in same .json file?
Following field is missing from .json file downloaded from firebase dashboard.
"services": {
"analytics_service": {
"status": 2,
"analytics_property": {
"tracking_id": "some_tracking_id"
}
},
When I downloaded google-services.json
from Firebase console, analytics-service
looked like this:
"analytics_service": {
"status": 1
},
However, since I have configured Google analytics as instructed here using global_tracker.xml
file, it seems there is no need to have it configured in the google-services.json
.
这篇关于针对Firebase和Google Analytics的google-services.json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!