【问题标题】:Google Funding Choices not working - googlefc.getConsentStatus() always returns UNKNOWNGoogle Funding Choices 不起作用 - googlefc.getConsentStatus() 总是返回 UNKNOWN
【发布时间】:2020-08-24 01:55:51
【问题描述】:

昨天,出于 GDPR / EU CMP 的目的,我试图从 Quantcast Choice 迁移到 Google Funding Choices。由于某种原因,在提示同意并在消息对话框中单击“同意”后,方法googlefc.getConsentStatus() 总是返回UNKNOWN (0)。

经过进一步调查,似乎无论与同意消息进行什么样的交互(直接点击同意按钮,拒绝它,选择个别供应商等)getConsentStatus()总是返回UNKNOWN

有人知道发生了什么吗?我错过了什么吗?

我正在使用的相关代码:

 window.googlefc.callbackQueue.push({
                'CONSENT_DATA_READY':
                    function () {                     
                        let consentStatus = window.googlefc.getConsentStatus();
                        vm.log("CM_CONSENT_STATUS", consentStatus);
                        switch (consentStatus) {
                            case window.googlefc.ConsentStatusEnum.CONSENTED_TO_PERSONALIZED_ADS:
                            case window.googlefc.ConsentStatusEnum.CONSENT_NOT_REQUIRED:
                                vm.allow(true);
                                break;
                            case window.googlefc.ConsentStatusEnum.CONSENTED_TO_NON_PERSONALIZED_ADS:
                                vm.reject(true);
                                break;
                            case window.googlefc.ConsentStatusEnum.UNKNOWN:
                            case window.googlefc.ConsentStatusEnum.NO_CONSENT:
                                break;
                        }
                    }
            });

window.googlefc.getConsentStatus()总是返回window.googlefc.ConsentStatusEnum.UNKNOWN

【问题讨论】:

    标签: javascript cookies google-ad-manager gdprconsentform


    【解决方案1】:

    这实际上似乎是预期的行为,因为“如果您使用的是 IAB TCF v2 框架,window.googlefc.getConsentStatus() 将始终返回 window.googlefc.ConsentStatusEnum.UNKNOWN”。我遇到了同样的问题,并在 reddit 上跟踪了答案:https://www.reddit.com/r/adops/comments/ifh6n9/anybody_using_google_funding_choices_for_gdpr_cmp/

    虽然我没有找到让 googlefc.getConsentStatus() 函数正常工作或与之等效的解决方法,但我的 CMP 模态正常工作(您不必拥有此代码即可使其正常工作。唯一的您真正要做的是将资金选择粘贴到头顶,而不是使用 (adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1; 或其他任何内容停止广告请求,因为资金选择会自行暂停广告- 然后在同意后启动它们而不重新加载)

    【讨论】:

      猜你喜欢
      • 2022-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-01
      • 2017-02-03
      • 1970-01-01
      相关资源
      最近更新 更多