[英]Delete firebase analytics events
Is there any way or some kind of "hack" to immediately delete events logged in to my firebase or google analytics project?有什么方法或某种“黑客”可以立即删除登录到我的 firebase 或谷歌分析项目的事件? I heard that it is possible to create some kind of cloud function which is eligible to delete events, but I was unable to find any clue how to do it after several hours of googling.我听说可以创建某种可以删除事件的云 function,但是经过几个小时的谷歌搜索,我找不到任何线索。
The Google Analytics User Deletion API allows to process deletions of data associated with a given user identifier Requesting data deletions . Google Analytics 用户删除 API 允许处理与给定用户标识符相关的数据删除请求数据删除。 There is a drop down menu on the top right corner of the events dashboard.事件仪表板的右上角有一个下拉菜单。 You have a ton of options and you can even set a custom time frame.您有很多选择,甚至可以设置自定义时间范围。
As far as doing this from Functions, it's a microservice;就从 Functions 执行此操作而言,它是一个微服务; if there is an API to call and you have credentials, you can do it from Functions.如果要调用 API 并且您有凭据,则可以从 Functions 执行此操作。
Cloud Functions supports Google Analytics AnalyticsEvent . Cloud Functions 支持 Google Analytics AnalyticsEvent 。 With Cloud Functions, you can access conversion events you have logged and trigger functions based on those events.借助 Cloud Functions,您可以访问已记录的转化事件并根据这些事件触发函数。 This event is triggered whenever user activity generates a conversion event.只要用户活动产生转化事件,就会触发此事件。 you could write a function that triggers when the event is generated, indicating that event has occurred.您可以编写一个 function ,它在事件生成时触发,表明该事件已发生。
Google Analytics for Firebase triggers the log event. Google Analytics for Firebase 触发日志事件。 This is a powerful event type, since any action that a user takes in your app can be logged and in turn trigger a function.这是一种强大的事件类型,因为用户在您的应用程序中执行的任何操作都可以记录下来,进而触发 function。
For example, you could write a function that triggers when the in_app_purchase event
is generated, indicating that an in-app purchase has occurred.例如,您可以编写一个 function,当in_app_purchase event
时触发,表明发生了应用内购买。 You must specify the Analytics event that you want to trigger your function using the functions.analytics.event()
method, and handle the event within the onLog()
event handler:您必须使用functions.analytics.event()
方法指定要触发 function 的 Analytics 事件,并在onLog()
事件处理程序中处理该事件:
exports.sendCouponOnPurchase = functions.analytics.event('in_app_purchase').onLog((event) => {
// Your code to handle delete
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.