Web应用程序Firebase分析中的同意模式

发布于 2025-01-25 05:58:57 字数 100 浏览 5 评论 0原文

是否可以为Firebase Analytics(GA4)JS SDK(Web应用程序)设置同意模式?该文档似乎仅适用于移动应用程序。如果没有,还有其他方法可以关闭其符合GDPR的饼干吗?

Is it possible to set Consent Mode for Firebase Analytics (GA4) JS SDK (web app)? The documentation seems to be only for mobile apps. If not, is there any other way to turn off their cookies for GDPR compliance?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浪荡不羁 2025-02-01 05:58:57

有一个setConsent方法记录在这里。

setConsent()

在初始化Firebase Analytics(初始化Firebase Analytics)的所有GTAG参考中,将此Web应用程序的最终用户同意状态设置。

使用共识来指定个人同意类型值。默认情况下,同意类型设置为“授予”。

export declare function setConsent(consentSettings: ConsentSettings): void;

There is a setConsent method documented here.

setConsent()

Sets the applicable end user consent state for this web app across all gtag references once Firebase Analytics is initialized.

Use the ConsentSettings to specify individual consent type values. By default consent types are set to "granted".

export declare function setConsent(consentSettings: ConsentSettings): void;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文