javascript - How to check canceled events in firebase web - Stack Overflow

How to determine or track if an event was sent successfully and is not in a "canceled" state?

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745573594a4633829.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信