20

为了遵守 GDPR,谷歌表示我必须“选择广告技术提供商”并征得用户的同意。但是,如果任何发布商 ID 使用常用的一组广告技术提供商,则不支持 Google 呈现的同意书。这意味着我需要为我的帐户手动选择广告技术提供商,以避免使用“使用发布商管理的同意收集选项”自行收集同意。在这里我是空白的。

我应该选择哪些,如果我不使用中介而只使用 admob 会有什么不同?我应该只使用一个提供商,即谷歌吗?

编辑:感谢您的反对。老实说,我不明白为什么这不是一个有效的问题,除了也许应该在其他地方问这个问题,我为此寻求指导。

4

3 回答 3

4

一个星期以来,我一直试图回答自己这个问题。这就是我所做的。

检查您的 Adsense 帐户,转到“高级报告”>“广告网络”,您将看到您的应用从中获得广告的所有广告技术提供商,这应该让您了解哪些广告提供商对您有好处。

如果您的应用是新应用且没有任何数据,我建议您只使用 Google(默认)。

在我的特殊情况下,我的应用程序已经运行了 8 个月,安装量为 450 次,活动安装量为 45 次。

Google Networks 报告的展示次数为 91.5%,估算收入为 97.3%。

当用户想要查看应用程序与谁共享信息时,IMO 将谷歌作为唯一一个提供商会看起来更好,而不是列出 12 个从未听说过的列表。一开始我想选择最好的 12 个,但从数字上看没有多大意义,我选择单独使用谷歌。

免责声明:我对广告网络一无所知,我选择 Google 是因为我的 Admob 历史,仅此而已。

于 2018-06-06T18:09:47.660 回答
1

好的,所以我最终实施了自己的同意机制。我认为它符合要求,所以为了他人的利益,这里是:

首先,声明这些变量。这些将用于决定您是否需要出示同意书:

boolean shouldShowConsentForm = false;
boolean goAdFreeChosen = false; // to prevent firing the consent dialog when going into settings.

使用此方法告诉用户您将征求同意:

void showConsentDialogIntro(final Context context) {
    Bundle params = new Bundle();
    params.putString("what", "showConsentDialogIntro");
    mFirebaseAnalytics.logEvent(CONSENT_COLLECTION, params);

    AlertDialog.Builder builder = new AlertDialog.Builder(context);
    builder.setTitle("Something important before you continue...").
            setMessage("This app is kept free by showing ads. Tap next to see privacy options regarding this.\n\n(You can change this later in Settings too)").
            setPositiveButton("Next", new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    showYesNoDialog(context, true);
                }
            })
            //.setNegativeButton("Cancel", null)
            .show();
}

然后此方法将给用户 3 个选择 - 同意、不同意或完全删除广告:

private void showYesNoDialog(final Context context, boolean shouldReportInFirebase) {
    if (shouldReportInFirebase) {
        Bundle params = new Bundle();
        params.putString("what", "showYesNoDialog");
        mFirebaseAnalytics.logEvent(CONSENT_COLLECTION, params);
    }

    AlertDialog.Builder builder = new AlertDialog.Builder(context);
    final CharSequence[] items = {"Yes - Shows relevant ads", "No - Shows less relevant ads", "Go Ad free",
            "Learn how our partners collect and use your data"};
    builder.setTitle("Can THIS_APP_NAME use your data to tailor ads for you?").
            setItems(items, new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    Bundle params = new Bundle();
                    switch (which) {
                        case 0: // yes
                            ConsentInformation.getInstance(context)
                                    .setConsentStatus(ConsentStatus.PERSONALIZED);
                            shouldShowConsentForm = false;

                            mInterstitialAd.loadAd(new AdRequest.Builder()
                                    .addTestDevice(TEST_DEVICE_FOR_ADS)
                                    .build());

                            params.putString("what", "yes");
                            break;
                        case 1: // no
                            ConsentInformation.getInstance(context)
                                    .setConsentStatus(ConsentStatus.NON_PERSONALIZED);
                            shouldShowConsentForm = false;

                            Bundle extras = new Bundle();
                            extras.putString("npa", "1");
                            mInterstitialAd.loadAd(new AdRequest.Builder()
                                    .addNetworkExtrasBundle(AdMobAdapter.class, extras)
                                    .addTestDevice(TEST_DEVICE_FOR_ADS)
                                    .build());

                            params.putString("what", "no");

                            Snackbar.make(myToolbar, "We'll partner with Google and use a unique identifier to respect your choice.",
                                    Snackbar.LENGTH_LONG).addCallback(new BaseTransientBottomBar.BaseCallback<Snackbar>() {
                                @Override
                                public void onDismissed(Snackbar transientBottomBar, int event) {
                                    super.onDismissed(transientBottomBar, event);
                                    Snackbar.make(myToolbar, "You can change your choice later in Settings.", Snackbar.LENGTH_LONG).show();
                                }
                            })
                                    //.setDuration(3500)
                                    .show(); // 3500 is perhaps the duration for LENGTH_LONG.
/*
                            new Handler().postDelayed(new Runnable() {
                                @Override
                                public void run() {
                                    Snackbar.make(myToolbar, "You can change your choice later in Settings.", Snackbar.LENGTH_LONG).show();
                                }
                            }, 3500);
*/
                            break;
                        case 2: // ad free
                            // drawer.setSelection(settings, true);
                            goAdFreeChosen = true;
                            drawer.setSelection(DRAWER_IDENTIFIER_SETTINGS, true);

                            params.putString("what", "ad_free");
                            break;
                        case 3: // learn more
                            showLearnMoreDialog(context);

                            params.putString("what", "showLearnMoreDialog");
                            break;
                    }
                    mFirebaseAnalytics.logEvent(CONSENT_COLLECTION, params);
                }
            })
            // .setNegativeButton("Cancel", null)
            .show();
}

如果用户点击了解更多(上面菜单中的第 4 个选项),他们将看到所有提供商的列表,他们可以点击以查看各自的隐私政策:

private void showLearnMoreDialog(final Context context) {
    List<AdProvider> adProviders =
            ConsentInformation.getInstance(context).getAdProviders();

    final CharSequence[] itemsName = new CharSequence[adProviders.size()];
    final String[] itemsURL = new String[adProviders.size()];

    int i = 0;
    for (AdProvider adProvider : adProviders) {

        itemsName[i] = adProvider.getName();
        itemsURL[i] = adProvider.getPrivacyPolicyUrlString();
        i++;
    }

    ArrayAdapter adapter = new ArrayAdapter<>(context,
            android.R.layout.simple_list_item_1, itemsName);

    AlertDialog.Builder builder = new AlertDialog.Builder(context);

    builder.setTitle("Tap on our partners to learn more about their privacy policies")
            .setNegativeButton("Back", null)
            .setSingleChoiceItems(adapter, -1, new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                            /*        Toast.makeText(context,
                                            "URL: " + itemsURL[which].toExternalForm(), Toast.LENGTH_SHORT).show();*/
                    Intent browserIntent = new Intent(Intent.ACTION_VIEW,
                            Uri.parse(itemsURL[which]));
                    startActivity(browserIntent);

                    Bundle params = new Bundle();
                    params.putString("what", "showLearnMoreDialog_open_privacy_policy");
                    mFirebaseAnalytics.logEvent(CONSENT_COLLECTION, params);
                }
            })
            .setCancelable(true)
            .setOnDismissListener(new DialogInterface.OnDismissListener() {
                @Override
                public void onDismiss(DialogInterface dialog) {
                    showYesNoDialog(context, false);
                }
            })
            .show();
}

请注意,我也在其中实现了 firebase 分析,但如果您不想记录这些事件,则可以删除与“params”相关的行。

您可以使用此方法查看同意状态:

private void getConsentStatusAndLoadAdAccordingly(final Context context) {
    ConsentInformation consentInformation = ConsentInformation.getInstance(context);
    //   consentInformation.addTestDevice(TEST_DEVICE_FOR_ADS);
    //   consentInformation.setDebugGeography(DebugGeography.DEBUG_GEOGRAPHY_EEA); // for forcing Europe area; testing.
    //   consentInformation.setConsentStatus(ConsentStatus.UNKNOWN); // useful for triggering it after saving status; testing.

    String[] publisherIds = {MY_PUBLISHER_ID};
    consentInformation.requestConsentInfoUpdate(publisherIds, new ConsentInfoUpdateListener() {
        @Override
        public void onConsentInfoUpdated(ConsentStatus consentStatus) {
            loog("consentInformation", "onConsentInfoUpdated");
            // User's consent status successfully updated.
            if (ConsentInformation.getInstance(context).isRequestLocationInEeaOrUnknown()) {
                loog("consentInformation", "isRequestLocationInEeaOrUnknown = true");
                    /* If the isRequestLocationInEeaOrUnknown() method returns false, the user is not
                    located in the European Economic Area and consent is not required under the EU User Consent Policy.

                    If the isRequestLocationInEeaOrUnknown() method returns true:
                    If the returned ConsentStatus is PERSONALIZED or NON_PERSONALIZED, the user has already provided consent.
                    You can now forward consent to the Google Mobile Ads SDK.
                    If the returned ConsentStatus is UNKNOWN, you need to collect consent. */
                loog("consentInformation", "consentStatus = " + consentStatus);

                if (consentStatus == ConsentStatus.UNKNOWN) {
                    // showGoogleConsentForm(DrawerAndFragmentActivity.this);
                    shouldShowConsentForm = true;
                } else if (consentStatus == ConsentStatus.NON_PERSONALIZED) {
                        /* The default behavior of the Google Mobile Ads SDK is to serve personalized ads. If a user
                    has consented to receive only non-personalized ads, you can configure an AdRequest object
                    with the following code to specify that only non-personalized ads should be returned: */
                    Bundle extras = new Bundle();
                    extras.putString("npa", "1");
                    mInterstitialAd.loadAd(new AdRequest.Builder()
                            .addNetworkExtrasBundle(AdMobAdapter.class, extras)
                            .addTestDevice(TEST_DEVICE_FOR_ADS)
                            .build());
                } else if (consentStatus == ConsentStatus.PERSONALIZED) {
                    mInterstitialAd.loadAd(new AdRequest.Builder()
                            .addTestDevice(TEST_DEVICE_FOR_ADS)
                            .build());
                }
            } else {
                loog("consentInformation", "isRequestLocationInEeaOrUnknown = false");
                mInterstitialAd.loadAd(new AdRequest.Builder()
                        .addTestDevice(TEST_DEVICE_FOR_ADS)
                        .build());
            }
        }

        @Override
        public void onFailedToUpdateConsentInfo(String errorDescription) {
            // User's consent status failed to update.
            loog("consentInformation", "onFailedToUpdateConsentInfo: errorDescription = " + errorDescription);

            mInterstitialAd.loadAd(new AdRequest.Builder()
                    .addTestDevice(TEST_DEVICE_FOR_ADS)
                    .build());
        }
    });
}

最后,当您需要决定是显示广告还是显示同意书时,您可以使用如下逻辑:(shouldShowAd 是一个可选的布尔值,为了更清楚,我喜欢使用它)

if (shouldShowAd) {
                            if (shouldShowConsentForm) {
                                if (!goAdFreeChosen)
                                    showConsentDialogIntro(DrawerAndFragmentActivity.this);
                                goAdFreeChosen = false;
                            } else {
                                if (mInterstitialAd != null)
                                    if (mInterstitialAd.isLoaded()) {
                                        mInterstitialAd.show();
                                    }
                            }
                        }
于 2018-11-02T08:14:28.083 回答
1

你所说的“谷歌呈现的同意书”是谷歌制作的一个开源库,用于显示和收集用户的同意。

根据 GDRP,此同意书应显示所有 admob 提供者的隐私政策。但是这个库最多只能显示 12 个提供者。

所以你有3个选择:

1-您限制自己使用 12 个 admob 提供程序。

2- 您制作自己的同意书。

3-您从 github 下载谷歌图书馆同意书并修改它以显示所有广告提供商

于 2018-05-30T01:41:56.627 回答