Open angelbuzon opened 6 years ago
Hm what I don't understand is: What will happen if we don't show the dialog? Is this considered "breaking the law", will Google stop serving ads, or ... ?
Or millions to pay... But what if I don't have them? 😲
hey Google will show adds to us but if app is used by european people you might get penalised by europe government that is 4% of global revenue or app will get banned in europe and continue to work worldwide.This is for european users only.
@anuragbatra but european people can be out of europe so app can violate law...
For now I just have a global user agreement that wraps Ads and Analytics. If the user does not consent it then he can not use it.
Is there any communication between the plugin and Admob if you don't call prepare and show? Are you safe if you add the plugin to the apk but for users that don't want tracking to not show and prepare ads?
At least we need this part to be configurable
Bundle extras = new Bundle();
extras.putString("npa", "1");
AdRequest request = new AdRequest.Builder()
.addNetworkExtrasBundle(AdMobAdapter.class, extras)
.build();
So we can build our own consent sdk and show non targeted ads if needed.
@gartorware I think it is already doable by adding this when you create a banner/interstitial: adExtras: {npa: 1}
For example:
admob.banner.config({
id: 'bannerId',
autoShow: false,
overlap: true,
adExtras: {npa: 1}
});
admob.banner.prepare();
See the actual code of the plugin:
AdmobConfig.java
if (options.has(OPT_AD_EXTRAS)) {
this.adExtras = options.optJSONObject(OPT_AD_EXTRAS);
}
Admob.java
Bundle bundle = new Bundle();
bundle.putInt("cordova", 1);
if (config.adExtras != null) {
Iterator<String> it = config.adExtras.keys();
while (it.hasNext()) {
String key = it.next();
try {
bundle.putString(key, config.adExtras.get(key).toString());
} catch (JSONException exception) {
Log.w(TAG, String.format("Caught JSON Exception: %s", exception.getMessage()));
}
}
}
builder = builder.addNetworkExtrasBundle(AdMobAdapter.class, bundle);
@tominou Thankyou for the suggestion, however it didn't work. I tried many combinations but cant figure it out.
Here is the error:
[22:50:46] typescript: src/app/app.component.ts, line: 69
Type '{ id: string; autoShow: false; isTesting: false; size: string; adExtras: { npa: number; }; }' is not
assignable to type 'AdMobFreeBannerConfig'. Object literal may only specify known properties, and 'adExtras'
does not exist in type 'AdMobFreeBannerConfig'.
L69: adExtras: {npa: 1}
@crushingCodes I just added to some logic and modified AdMob.java and AdMobConfig and it works =)
I sent new type of size and execute it with new param if user set npa
@crushingCodes We have 1 day. I modified files and it works 😄
just use BANNER_GDPR and SMART_BANNER_GDPR as AdSiz if you need to set npa option:
let options: AdMobFreeBannerConfig = {
id: this.user.admobid.banner,
isTesting: false,
autoShow: true
};
options.size = (this.user.currentLanguage == "ru" ? "BANNER" : "SMART_BANNER") + (this.user.gdprRestrictionEnabled ? "_GDPR" : "");
@ivanov84 Thank you so much. I will have a go as soon as I get a chance this afternoon
Hello,
Do you know if this very nice plugin will be updated to allow setting the npa flag ?
Google consent sdk already exists as cordova plugin ?
@tominou Thanks for the tip, I'm going to check that, seems like the way to go. @crushingCodes That's not a problem with this plugin, but with ionic-native wrapper. Just add this while they update the code:
export interface ExtendedAdMobFreeBannerConfig extends AdMobFreeBannerConfig {
adExtras: any;
}
export interface ExtendedAdMobFreeInterstitialConfig extends AdMobFreeInterstitialConfig {
adExtras: any;
}
export interface ExtendedAdMobFreeRewardVideoConfig extends AdMobFreeRewardVideoConfig {
adExtras: any;
}
And then use your custom interface instead of theirs:
const bannerImageConfig: ExtendedAdMobFreeBannerConfig = {
id: ....,
isTesting: true,
autoShow: true,
bannerAtTop: false,
overlap: false,
offsetTopBar: true,
adExtras: { npa: 1 }
};
this.admobFree.banner.config(bannerImageConfig);
this.admobFree.banner.prepare();
I'm going to check if it works.
Thanks for response.
But we cannot do that with phonegap build ? (We cannot edit plugin codes)
That change is not in plugin code, it can be done in your code. Just add the new interfaces before your app.component class (or wherever you use the plugin).
Anyway I cannot try if it works because firebase (I guess) has been updated and now I can't build my project (no time to create a new one sorry).
Guys i need to add this to my apps is it automatically show notification to agree or i need to add it manually
@gartorware Hey mate, that did the trick, well at least its building and letting me use the npa setting so should be good now, next step will be trying to work out this consent business. Your advice is nice and easy to implement cheers
@crushingCodes bro can you help me to add this to my app to comply with the new GDPR update
@gartorware how can I check if I setting this option, it leads to no personalised advertising being delivered in my app?
Is there a way to see a list of what can we use for in this OPT_AD_EXTRAS
??
also: +1 to how can I check if I setting this option, it leads to no personalized advertising being delivered in my app?
did you find out how to check if ads are personalized or not @gartorware @wo-github
It is theoretically a very critical issue so it needs to be properly tested and documented ASAP as you can get fined at least 20 million for infringements. Maybe even make this the default option (with npa
flag set) to prevent developer mistakes.
yes , if some one can help me with this would be great... playstore and admob is sending alerts to use this or apps will get banned
Just send npa: 1
admob.interstitial.config({
id: 'ca-app-pub-xx',isTesting: false,adExtras: { npa: 1 }
}) or admob.interstitial.config({
id: 'ca-app-pub-xxx',isTesting: false
}).
is sending the same ads ... i realy dont think this adExtras: { npa: 1 } is working @ratson
admob.interstitial.config({ id: 'ca-app-pub-xx',isTesting: false,adExtras: { npa: 1 } }) or admob.interstitial.config({ id: 'ca-app-pub-xxx',isTesting: false }).
is sending the same ads ... i realy dont think this adExtras: { npa: 1 } is working @ratson
AFAIK @ratson does not works in this repo anymore but on https://github.com/admob-plus/admob-plus
@brunoalex how can you tell if the npa
flag is actually being sent? maybe those are the ads that are served for non-personalized option too. I mean, are you sure that it's not sending the flag to the admob sdk?
oh ok @distante did you manage to get this working ?
thats just it .. i dont know ... the ads look the same.. i tried to check the url from the ads to see if they have &npa but they didnt ...
oh ok @distante did you manage to get this working ?
I just manage my self the consent and send or not the npa extra option. If you see the Java code, the extra options are correctly sended.
Hi, is there any option to the GDPR:
https://developers.google.com/admob/android/eu-consent#forward_consent_without_the_consent_sdk