【问题标题】:How to use WordPress GDPR Cookie Consent plugin for Google Analytics如何为 Google Analytics 使用 WordPress GDPR Cookie 同意插件
【发布时间】:2021-03-15 09:30:23
【问题描述】:

我在我的 WordPress 应用程序中添加了 GDPR Cookie 同意插件。 当使用禁用不必要的 cookie 时,应阻止 Google Analytics,否则启用。 在 GDPR 插件中,我找到了两个字段:

This script will be added to the page HEAD section if the above settings is enabled and user has give consent.

和

This script will be added right after the BODY section if the above settings is enabled and user has given consent.

我可以在那里留下 JavaScript 代码。 比我找到 Google 支持页面:developers.google.com/analytics/devguides/...disabling_cookies

但我不能把它放在一起。这对我来说很复杂。我知道我的 GA 跟踪 ID。

我需要在哪个 GDPR 插件字段中实现哪些 JavaScript 代码?

非常感谢!

【问题讨论】:

    标签: wordpress google-analytics gdprconsentform


    【解决方案1】:

    您可以从 here 提到的分析帐户中复制 Google Analytics 跟踪代码,并将其复制到您提到的 cookie consent plugin 的头部脚本部分。

    【讨论】:

      猜你喜欢
      • 2023-03-16
      • 2020-05-08
      • 2022-10-04
      • 2018-10-27
      • 2020-01-04
      • 1970-01-01
      • 2018-10-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多