How to get the measurementId from the Firebase config?

偶尔善良 提交于 2020-04-07 08:33:05

问题


To play with Google Analytics for Web based projects on Firebase we need to use either the Firebase reserved URLs or to copy/update the Firebase config object as the documentation states here.

I am using the following command to print that config information though: firebase setup:web.

The problem is that it is not printing the measurementId field.

What should I do now?


回答1:


In fact the firebase setup:web is not printing the measurementId. But if you refer to Firebase CLI reference you can see that this command is deprecated:

Deprecated. Instead, use apps:sdkconfig and specify web as the platform argument.

You should now use the firebase apps:sdkconfig. From that command you'll have the measurementId.



来源:https://stackoverflow.com/questions/60804074/how-to-get-the-measurementid-from-the-firebase-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!