如何使用新的 Android 统一消息平台 SDK 请求非个性化 AdMob 广告

How to request non-personalized AdMob ads with the new Unified Messaging Platform SDK for Android(如何使用新的 Android 统一消息平台 SDK 请求非个性化 AdMob 广告)
本文介绍了如何使用新的 Android 统一消息平台 SDK 请求非个性化 AdMob 广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I am currently using Google's (deprecated) consent-library to request consent for personalized ads from European users. The documentation specifies that if a user's consent status is already set to PERSONALIZED or NON_PERSONALIZED, you can forward consent to the Google Mobile Ads SDK with:

Bundle extras = new Bundle();
extras.putString("npa", "1");

AdRequest request = new AdRequest.Builder()
    .addNetworkExtrasBundle(AdMobAdapter.class, extras)
    .build();

Now I want to migrate to the new Unified Messaging Platform SDK for Android. The documentation is pretty straightforward, but it only explains how to get consent, not how to use the consent. Does this mean that when using the new UMP SDK for Android, we no longer have to set the "npa" is "1" when requesting an AdMob ad for a user that did not consent to personalized ads?


EDIT 25 Aug 2020

Yesterday I found this conversation where somebody from the Mobile Ads SDK team responded to the same question I asked here. He says that:

The legacy "Passing of consent" through npa=1 will be honored by our SDK until further notice.


EDIT 31 Aug 2020

I started a new conversation where I ask the same question as the one in this post, but I am not getting any response.

解决方案

With the new Unified Messaging Platform, Google is working as a Consent Managing Platform. These CMP's use a TCF string to store the user consent preferences. Google checks this TCF string to see which ads can be shown;

As per the Google documentation:

Google will serve personalized ads when all of the following criteria are met:

  1. The end user grants Google consent to Store and/or access information on a device
  2. Create a personalized ads profile
  3. Select personalized ads

And legitimate interest (or consent, where a publisher configures their CMP to request it) is established for Google to:

  1. Select basic ads
  2. Measure ad performance
  3. Apply market research to generate audience insights
  4. Develop and improve products

If the consent requirements for personalized ads are not met, Google will serve non-personalized ads when all of the following criteria are met:

  1. Store and/or access information on a device

Legitimate interest (or consent, where a publisher configures their CMP to request it) is established for Google to:

  1. Select basic ads
  2. Measure ad performance
  3. Apply market research to generate audience insights
  4. Develop and improve products
  5. Enable Google in the vendor list.

Update 20 October: Apparently 3,4,5 are not needed anymore to show non-personal ads SO @Georg for providing this information.

If none of the conditions above are met Google won't be showing ads..

I hope this answers your question but if you need more information please let me know!

这篇关于如何使用新的 Android 统一消息平台 SDK 请求非个性化 AdMob 广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)