MFlisar / GDPRDialog

GDPR fragment dialog implementation
Apache License 2.0
211 stars 53 forks source link

AdMob Privacy Policy and Ad techonolgy providers (some ideas about the Info Page) #18

Closed Luklek closed 6 years ago

Luklek commented 6 years ago

When AdMob is setup, it should display something like AdMob (and its Ad techonolgy providers, marked with * in the linked page). [I know my wording kind of sucks] Click on AdMob would open the AdMob Privacy Policy (which I am not even sure it exists... it could be the new generic Google Policy where it also explains about data and personalized ads). Click on Ad techonolgy providers would open the current link with list of providers.

The main reason behind my idea is that the current Link isn't really the AdMob Privacy Policy at all. And most of all we should find a way to explain that the providers Our App is using are those marked with a * in the list. (this second part being more important for me... can skip the link to AdMob policy I guess)

Another way could be to integrate the Google Consent SDK just to get a list of the actual AdProviders as setup in our AdMob account. List<AdProvider> adProviders = ConsentInformation.getInstance(context).getAdProviders(); Then display the list when the user click Ad techonolgy providers in the Info Page. There is a similar solution posted on Androidev reddit already.

MFlisar commented 6 years ago

I can think about extending the GDPRDefinitions to also support multiple links so you could do following:

// this is just like it is currently
GDPRNetwork myAdMobDefinitions = new GDPRNetwork(
    "AdMo",
   "main privacy policy link",
   context.getString(R.string.gdpr_type_ads),
   true, // is a collection of service 
   true // is an ad network
);

// following could be added
myAdMobDefinitions
    .addSubNetwork("Ad technology provider 1", "privacy policy link 1")
    .addSubNetwork("Ad technology provider 2", "privacy policy link 2")
   . addSubNetwork("Ad technology provider 3", "privacy policy link 3")
   // and so on
   ;

And then the dialog could show a text like following e.g.:

We use following third party services in this app: [AdMob]() ([Ad technology provider 1](), [Ad technology provider 2](), [Ad technology provider 3]()) and [Firebase]() ...

Let me know what you think about this

Luklek commented 6 years ago

The problem is that the default list of Ad Providers is 200 (the ones marked with * in the https://support.google.com/admob/answer/9012903

One of the reasons to use a custom Consent dialog (instead of Google consent SDK dialog) is that we aren't limited to just 12 providers. And we can keep our AdMob account to use the Commonly used set of ad technology providers (200 at the moment) So I still think we should still link to the list above (and not to each Provider directly) but add information that our providers are the ones marked with *

To show the full list of providers directly in the App, I think integrating the consent SDK and using the .getAdProviders() to display a scrollable list would be better than manually adding each provider link.

MFlisar commented 6 years ago

Maybe we should define two ADMOB definitions like GDPRDefinitions.ADMOB_DEFAULTS and GDPRDefinitions.ADMOB_ALL and then we can add the info about the * for the default one.

My suggestions above allows to do what you want, simple create a loop to add all providers you get from the sdk for your own definition (no matter if they are 5, 10 or 200 or even more). Can you get the privacy policy link for each network as well?

Luklek commented 6 years ago

Can you get the privacy policy link for each network as well?

if you mean from the List<AdProvider> adProviders = ConsentInformation.getInstance(context).getAdProviders(); it includes also every Provider privacy policy link. ezgif-5-9cbfdc74bc

MFlisar commented 6 years ago

Check out following lines in the demo:

Add sub networks to a network (name + links): https://github.com/MFlisar/GDPRDialog/blob/efb77d7673ea45a965af3ddf32fa4ed6780052d0/app/src/main/java/com/michaelflisar/gdprdialog/demo/SetupActivity.java#L58-L68

List style instead of csv

https://github.com/MFlisar/GDPRDialog/blob/efb77d7673ea45a965af3ddf32fa4ed6780052d0/app/src/main/java/com/michaelflisar/gdprdialog/demo/SetupActivity.java#L111

List style is not optimised (no RecyclerView e.g.) but a simple html list, but I don't think this is a problem at all, even if the list needs to display 1000 networks...

Screenshot (german) of the list

screenshot_20180525-013917

MFlisar commented 6 years ago

Do you know if the list of ad providers can be retrieved as JSON as well without adding the SDK? Have you seen a link for it in the SDK somewhere? (I've not checked it myself)

Luklek commented 6 years ago

I just checked (it took me quite long to find it because I am far from being any kind of developer^^) It's the same url (as the location check) appending the AdMob publisher ID String publisherIdsString = TextUtils.join(",", this.publisherIds); (in case we have multiple AdMob accounts in the same app) Builder uriBuilder = Uri.parse(this.url).buildUpon().appendQueryParameter("pubs", publisherIdsString).appendQueryParameter("es", "2");

So the link will be http://adservice.google.com/getconfig/pubvendors?pubs=pub-XXXXXXXXXXXXXXX,pub-YYYYYYYYYYYYYYYYYY&es=2

This way the JSON include also list of all ad providers as setup in the AdMob account setting EU page. Also please note that the list will be empty (just the location string) when accessing the url from a NON-EU address.

All the code used to get the list should be here: https://github.com/googleads/googleads-consent-sdk-android/blob/73ec9dd0589285ef883d6badc7c7facf5c9a3288/consent-library/src/main/java/com/google/ads/consent/ConsentInformation.java And the AdProviders information here: https://github.com/googleads/googleads-consent-sdk-android/blob/73ec9dd0589285ef883d6badc7c7facf5c9a3288/consent-library/src/main/java/com/google/ads/consent/AdProvider.java

MFlisar commented 6 years ago

Checkout following two functions:

https://github.com/MFlisar/GDPRDialog/blob/e6b30c320011922dcda811067d1ef38614681003/app/src/main/java/com/michaelflisar/gdprdialog/demo/SetupActivity.java#L102 https://github.com/MFlisar/GDPRDialog/blob/e6b30c320011922dcda811067d1ef38614681003/app/src/main/java/com/michaelflisar/gdprdialog/demo/SetupActivity.java#L115

All 200 ad providers are directly shown in the dialog (if they could be loaded)

screenshot_20180525-090414 1

dzungpv commented 6 years ago

Your lib could better than the consent sdk from admob. But you can add option like add free option from the Consent sdk, use list if user want to use list from admob for publisher id (may be you just add above). Consent sdk from admob very bad. They are not support translate the content ..... You should marketing this lib like post in reddit, twitter, fb, etc so someone can translate full text soon for all EEA. I am not an native speaker so could not translate any.

MFlisar commented 6 years ago

add option like add free option

Can be done with withAllowNoConsent(boolean allowNoConsent) and/or setup.withPaidVersion(boolean alsoProvideNonPersonalisedOption)

use list if user want to use list from admob

that's what setup.withLoadAdMobNetworks("<publisher ID>"); does...

simply check the demo app and try it to see all the differences

Luklek commented 6 years ago

In listview mode, the order of the services is the same as defined in GDPRSetup. Without listiview, I am not sure what kind of orders is using. device-2018-05-25-154340 device-2018-05-25-154428

To get the look I wanted (to show that the long list are the ad providers used by AdMob), I changed gdpr_network_admob string to "AdMob and its ad providers" To add different Links for MoPub policy and for its partners list, I used .addSubNetwork to add the MoPub partners text/link. The drawback is that those short sentences aren't translated to many languages. For me is already 100% good like this, but maybe you can think of a better idea.

When testing from NON-EU ip address, the adProvider list from AdMob is empty. I will use location check so for me it isn't an issue at all, but maybe you could add something like

if(listProvider.isEmpty()){
            listName.add("Full list");
            listUrl.add("https://support.google.com/admob/answer/9012903");
        }

to show link to full list of providers

MFlisar commented 6 years ago

If you try it, let me know if you have a better idea for the text than "show me their partners"

Luklek commented 6 years ago

Just one more thing if you can. Can you add something like "(below a list of their ad providers)" next to AdMob when using the listview (AdProvider list isn't empty or when using .addSubNetwork) device-2018-05-25-201032

I added more networks and fixed MoPub link in GDPRDefinitions

MFlisar commented 6 years ago

Actually, for the user, it does not make a big difference if the sub networks are used directly or via AdMob... The intention in the list is enough imho... And I don't want to add any new text that is not important anymore as I would need it's translation and I want to make the next release today

Thanks for PR

Luklek commented 6 years ago

It was just to explain to the user that the long list are the Ad Providers of AdMob. But maybe it's obvious anyway^^ Can close this I think then.