admin管理员组文章数量:1023782
How to determine or track if an event was sent successfully and is not in a "canceled" state? Events are not being delivered, and I don’t know how to implement retries. To enable retries, I at least need to track if the event was sent.
The logEvent function returns void in the Firebase JS SDK.
import {
logEvent,
} from 'firebase/analytics';
//other code
public logEvent(data: Record<string, unknown>) {
const dataCopy = JSON.parse(JSON.stringify(data));
const name = toSnakeCase(dataCopy.name as string);
if (this.isSkipLog) return;
logEvent(this.analytics, name, {
context_platform: 'web',
});
}
I tried to find a solution in the library, wrapping it in a try-catch block, but I couldn’t find a solution anywhere.
How to determine or track if an event was sent successfully and is not in a "canceled" state? Events are not being delivered, and I don’t know how to implement retries. To enable retries, I at least need to track if the event was sent.
The logEvent function returns void in the Firebase JS SDK.
import {
logEvent,
} from 'firebase/analytics';
//other code
public logEvent(data: Record<string, unknown>) {
const dataCopy = JSON.parse(JSON.stringify(data));
const name = toSnakeCase(dataCopy.name as string);
if (this.isSkipLog) return;
logEvent(this.analytics, name, {
context_platform: 'web',
});
}
I tried to find a solution in the library, wrapping it in a try-catch block, but I couldn’t find a solution anywhere.
本文标签: javascriptHow to check canceled events in firebase webStack Overflow
版权声明:本文标题:javascript - How to check canceled events in firebase web - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745573593a2156884.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论