[英]Connection between Consent request and Google AdMob to show personalized or non-personalized ads
I use the UMP to obtain user consent.我使用 UMP 来获得用户同意。 And then I want to show ads with Google AdMob.然后我想用 Google AdMob 展示广告。 In the UMP documentation the part "Forward consent to the Google Mobile Ads SDK" exists.在 UMP 文档中,存在“向 Google 移动广告 SDK 转发同意”部分。 According to this I can choose if AdMob should show personalized ads or non-personalized ads:据此,我可以选择 AdMob 应该显示个性化广告还是非个性化广告:
Bundle extras = new Bundle();
extras.putString("npa", "1");
AdRequest request = new AdRequest.Builder()
.addNetworkExtrasBundle(AdMobAdapter.class, extras)
.build();
But how do I get the information if the user Accepted ("Consent") or Rejected ("Do not consent") the consent form?但是,如果用户接受(“同意”)或拒绝(“不同意”)同意书,我如何获取信息? How do I know if I should show personalized ads or non-personalized ads?我如何知道应该展示个性化广告还是非个性化广告? Or should I add another button in my app asking what kind of ads the user wants to see?或者我应该在我的应用程序中添加另一个按钮,询问用户想要看到什么样的广告?
The only information I get with UserMessagingPlatform.getConsentInformation
is if the user already has chosen "Consent" or "Do not consent" (if the status == Obtained) but not what option he selected.我通过UserMessagingPlatform.getConsentInformation
获得的唯一信息是用户是否已经选择了“同意”或“不同意”(如果状态 == 已获得),但不是他选择的选项。
You don't need to forward this information to admob, the SDK itself takes care of it.您不需要将此信息转发给 admob,SDK 本身会处理它。 However:然而:
You need for both - personalized ads or non-personalized ads - consent from the user.您需要获得用户的同意 - 个性化广告或非个性化广告。 In the old Consent SDK, the user could choose between giving consent to personalized ads (by clicking YES), and giving consent to non-personalized ads (by clicking NO).在旧版 Consent SDK 中,用户可以选择同意个性化广告(单击“是”)和同意非个性化广告(单击“否”)。 The new UMP SDK seems to be different.新的UMP SDK 似乎有所不同。 The user can easily choose to give no consent at all.用户可以很容易地选择根本不同意。 Then, this is my understanding, no ads will be shown.然后,这是我的理解,不会显示任何广告。 I think the user can choose to receive non-p ads, but it's quite complicated, there are many options.我觉得用户可以选择接收非p广告,但是比较复杂,有很多选择。 It's easier to just click NO CONSENT.只需单击“不同意”更容易。
You could check if ads are shown, and if they are not, then request non-personalized ads – which I suspect should be shown.您可以检查广告是否显示,如果没有,则请求非个性化广告——我怀疑应该显示。 However, you should first get consent from the user.但是,您应该首先征得用户的同意。 In the UMP documentation you mentioned to use putString("npa", "1");
在您提到使用putString("npa", "1");
的 UMP 文档中, it says: , 它说:
The default behavior of the Google Mobile Ads SDK is to serve personalized ads. Google 移动广告 SDK 的默认行为是提供个性化广告。 If a user has consented to receive only non-personalized ads , you can configure an AdRequest如果用户已同意仅接收非个性化广告,您可以配置 AdRequest
In the new UMP SDK, if the user clicks no consent, you have no consent, even not for non-personalized ads.在新的 UMP SDK 中,如果用户点击不同意,您就没有同意,即使是非个性化广告也不同意。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.