Firebase - 从服务器端云功能记录事件 [英] Firebase - log events from server side cloud functions

查看:20
本文介绍了Firebase - 从服务器端云功能记录事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经使用 Firebase 开发了一款移动应用,并且想要添加分析功能.我们希望向分析添加几个从现有云功能触发的系统事件.我没有看到任何从云功能记录事件的方法,我看到的唯一方法是从客户端.有没有办法可以从服务器端记录事件?

We've developed a mobile app using Firebase and we want to add analytics. We want to add to the analytics several system events that are triggered from existing cloud functions. I do not see any way to log an event from a cloud function and the only way I see is from the client side. Is there a way we can log event from the server side ?

推荐答案

没有针对 Analytics 事件的服务器端日志记录.分析需要仅在客户端上可用的信息才能构建事件,而后端代码无权访问该信息.如果您需要在服务器上记录某些内容以用于分析,则必须记录到另一个目的地,然后将其全部导出(包括源自 Firebase 的事件)到 BigQuery,以便稍后进行匹配以进行查询.

There is no server side logging for Analytics events. Analytics requires information available only on the client in order to construct an event, and backend code doesn't have access to that information. If you need to log something on the server for use with analytics, you would have to log to another destination, and then export it all (including events originating from Firebase) to BigQuery to match up later for querying.

这篇关于Firebase - 从服务器端云功能记录事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆