I was really lost trying to figure out how to implement this dialog in Flutter. This video was absolutely a god send, covering everything I was confused about and packaging it really nicely so it's easy to use in any app. Thank you!
David - Nice explanation and good to see that all of this can be handled with google mobile ads. My question, now that we have the ump plugin for flutter, would it make more sense to use this as it simplifies the code base (Completers are not required). Secondly - are you saying that for a user to remove ALL ads from an app that they have not bought and they are based in EU, all they need to do is NOT CONSENT and then the ads are removed? Your example shows that this is the case but I think this is incorrect, If CONSENT is not given, I believe PERSONALISED ads should be false, i.e they should still see ADs but not personalised since the user has not consented.
Regarding your first question, what specific plugin are you referring to? Regarding your second question, indeed, if there is no consent, no ads are shown. This is the expected behavior designed by Google. There has been a lot of controversy about this, if you search online you will see many people criticizing this decision.
@@DavidSerranoIO I think this is incorrect, i.e if within the EU and the user does not consent to GDPR - It doesnt mean that ads cannot be shown. Non-Personalized Ads (NPA): If a user does not give consent for personalized ads under GDPR, you can still show non-personalized ads. Non-personalized ads are not based on a user's past behavior. They are targeted using contextual information rather than the user's behavior, such as the current content of the app or the user's general location (such as city or country). Consent Status Handling: When a user does not consent, you should inform the Google Mobile Ads SDK to only request non-personalized ads. This is typically done by setting an appropriate flag or parameter in your ad request to indicate that only non-personalized ads should be served. Imagine if you are writing a game or app whereby your only source of revenue is via ad's until the user buys tokens or subscribes. Once they subscribe you can remove ads. If they do not subscribe or buy tokens you can and must still show ads, its just that if they live within EU - and DO NOT CONSENT , then contextual and relevant ads must not be shown not must you allow tracking etc ... They will still get ads but just not relevant ads.
@@sabrinasalvador1420 Indeed, under the GDPR it is possible to show non-personalized ads if the user does not consent to tracking, but in the case of AdMob this is not the case. Despite the snippet of documentation you've shown me, AdMob does not show ads of any kind without consent. It's how the library is designed.
@DavidSerranoIO Emmm… Interesting - Could you possibly point me to your reference regarding 'AdMob does not show ads of any kind without consent" as I’m struggling to find full clarification on this. Additionally, I have downloaded a number of apps and : - Did not allow tracking - Did not consent (When the GDPR dialog gets displayed) I still received ads. Even if I go to ‘Manage Options’ and turn off all options (consent and legitimate interest) and do the same for the vendor screen etc. So either they haven’t used AdMob or they haven’t coded things correctly. However, I have just researched this in Android and looked at the Android code and it does appear to validate everything you are saying. i.e if a user does not consent to GDPR then no ads should be shown) - this means users within the EU can effectively turn off ads for an app whilst the same users outside of the EU will still be served ads! Based on your experience - What is the correct workflow when integrating Admob with ATT and GDPR consent ? i.e Assuming user in EU : 1) Do you do GDPR consent first and then ATT 2) Do you do ATT and then GDPR 3) Do you do GDPR and if no consent dont do ATT 4) Do you do ATT and if no consent dont do GDPR Assuming user outside of EU 1) Just do ATT Would appreciate your thoughts on this - also, FYI , I am using this plugins now : User messaging platform App tracking transparency Since the UMP SDK simplifies things somewhat.
@@sabrinasalvador1420 My advice is that you manage the ATT dialog also from google_mobile_ads. It can be configured from the AdMob console, and the library itself will be in charge of requesting it at the correct time, both for users in the EU and outside. You don't need to use a dedicated plugin for the ATT dialog, google_mobile_ads handles it all.
Thank you for a great intro to the GDPR implementation. My question, your example shows how to integrate and display GDPR screen that is created in Privacy & Messaging. However, assuming we also want to cater for iOS 14.x users and enable tracking and consequently show the IDFA explainer to our iOS 14.x users, can you advise how this will be achieved?
Mh good question, unfortunately I have not come across that specific case so I would not know how to guide you, of course the system dialogue is not going to work. I imagine that you would have to make a completely custom implementation for those users.
@@DavidSerranoIO Yes, we would need to check for iOS 14.x and that ATT hasnt been determined, then the most simplest way is to just handle the dialog in Flutter - once the users close the custom handle rolled flutter IDFA explainer dialog, we then launch the ATT system dialog.
In principle you should not access that data. But in case you want to do it, you can use the variables that the UMP saves in the shared preferences using the mechanism that I explain in the video.
isConsentFormAvailable() returns false; any ideas why? I have saved the form, and also tried enabling the debug to pretend to be within EU (even though I already am).
If I remember correctly, there are several reasons why the form may not be available. I seem to remember that one of them is an incorrect configuration in AdMob. I recommend that you look at the official documentation to review the entire process.
I am trying to force the device to be outside Eea with debugGeographyNotEea but it still appears? I deleted the app but it still showing that I am in Eea? do you have any advice?
I see, check your settings, if you are indicating that you are not in Europe then the SDK should tell you that it is not necessary to show the message. Alternatively, you can always try a VPN outside of Europe to see if it happens the same.
In your Try specifying : DebugGeography.debugGeographyNotEea and also include your test device : ["FA7243A34D1C922CA3D78F2AE7T620GG"] This is what worked for me.
Some texts disappeared in the above comment. here is the code consentDebugSettings: ConsentDebugSettings( debugGeography: DebugGeography.debugGeographyNotEea, testIdentifiers: ["FA7243A34D1C922CA3D78F2AE7T620GG"] ),
admob_consent_dialog is the name of the test application that I am showing. It is not a dependency. To do the implementation as I do, you must create initialization_screen.dart and ultimately, follow the tutorial as I explain it.
Review your implementation carefully. Several people have followed this guide and it has helped them. If you have a specific problem, explain it in detail and we will see if we can help you.
Unfortunately I do not have any project to share, however the instructions I give are mere guidelines, the final implementation will depend a lot on each person's application.
Keep in mind that the instructions I explain in the video are indicative, the final implementation will vary depending on how you have implemented your application.
If the dialog is not showing up then add your testId in the params like final params = ConsentRequestParameters( consentDebugSettings: ConsentDebugSettings( testIdentifiers: [My test Id Here], debugGeography: DebugGeography.debugGeographyEea, ), );
If you do this as a hobby, it is possible that just showing the popup will be enough. This video is aimed at professionals and companies that want to do this implementation seriously, taking into account all the relevant factors.
@@DavidSerranoIO Not really sure what you want to say...all I can do is repeat my original comment. So much bs just to show that little popup. I'm surprised google didn't make it simpler for something that just asks for your consent or not.
Hello, I'm very interested in this tutorial. I believe it explains the process of implementing the AdMob UMP SDK in Flutter with the GDPR dialog quite well. It's the only tutorial I've found, and it explains things clearly. However, being at a medium level, I find it a bit challenging. I've been trying for almost a month, but I always encounter an error. I haven't found the line 'builder: (context) => const MainScreen(),' anywhere. Could you please help me understand where to insert '.. => const InitializeScreen(targetWidget: XXXX()),);' in my main.dart file?. Please. MAIN.DART import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_web_plugins/url_strategy.dart'; import 'flutter_flow/flutter_flow_theme.dart'; import 'flutter_flow/flutter_flow_util.dart'; import 'flutter_flow/internationalization.dart'; import 'flutter_flow/nav/nav.dart'; import 'index.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); usePathUrlStrategy(); await FlutterFlowTheme.initialize(); runApp(MyApp()); } class MyApp extends StatefulWidget { // This widget is the root of your application. @override State createState() => _MyAppState(); ///_MyAppState(); ///////////////////// static _MyAppState of(BuildContext context) => context.findAncestorStateOfType()!; } class _MyAppState extends State { Locale? _locale; ThemeMode _themeMode = FlutterFlowTheme.themeMode; late AppStateNotifier _appStateNotifier; late GoRouter _router; @override void initState() { super.initState(); _appStateNotifier = AppStateNotifier.instance; _router = createRouter(_appStateNotifier); } void setLocale(String language) { setState(() => _locale = createLocale(language)); } void setThemeMode(ThemeMode mode) => setState(() { _themeMode = mode; FlutterFlowTheme.saveThemeMode(mode); }); @override Widget build(BuildContext context) { return MaterialApp.router( title: 'UMP SDK Dialog GDPR PRUEBA D. Serrano', localizationsDelegates: [ FFLocalizationsDelegate(), GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, ], locale: _locale, supportedLocales: const [Locale('en', '')], theme: ThemeData( brightness: Brightness.light, scrollbarTheme: ScrollbarThemeData(), ), darkTheme: ThemeData( brightness: Brightness.dark, scrollbarTheme: ScrollbarThemeData(), ), themeMode: _themeMode, routerConfig: _router, ); } }
I was really lost trying to figure out how to implement this dialog in Flutter. This video was absolutely a god send, covering everything I was confused about and packaging it really nicely so it's easy to use in any app. Thank you!
I'm glad it was useful to you!
Videos like these are the ones that get my Like & Subscribe.
You are legend been trying for days, thx really appreciated.
You're welcome!!
Nice, actually better than reading documentation 😊 youv'e just earned a sub
Thanks for watching the video! And thanks for the sub!
Bravo. So easy to follow!!! And it worked perfectly
I'm glad it was useful to you!
David Muchas gracias, tras buscar mucho para flutter es la guía más clara.
De nada! Me alegra que te haya sido útil!
David - Nice explanation and good to see that all of this can be handled with google mobile ads. My question, now that we have the ump plugin for flutter, would it make more sense to use this as it simplifies the code base (Completers are not required).
Secondly - are you saying that for a user to remove ALL ads from an app that they have not bought and they are based in EU, all they need to do is NOT CONSENT and then the ads are removed? Your example shows that this is the case but I think this is incorrect, If CONSENT is not given, I believe PERSONALISED ads should be false, i.e they should still see ADs but not personalised since the user has not consented.
Regarding your first question, what specific plugin are you referring to?
Regarding your second question, indeed, if there is no consent, no ads are shown. This is the expected behavior designed by Google. There has been a lot of controversy about this, if you search online you will see many people criticizing this decision.
@@DavidSerranoIO I think this is incorrect, i.e if within the EU and the user does not consent to GDPR - It doesnt mean that ads cannot be shown.
Non-Personalized Ads (NPA): If a user does not give consent for personalized ads under GDPR, you can still show non-personalized ads. Non-personalized ads are not based on a user's past behavior. They are targeted using contextual information rather than the user's behavior, such as the current content of the app or the user's general location (such as city or country).
Consent Status Handling: When a user does not consent, you should inform the Google Mobile Ads SDK to only request non-personalized ads. This is typically done by setting an appropriate flag or parameter in your ad request to indicate that only non-personalized ads should be served.
Imagine if you are writing a game or app whereby your only source of revenue is via ad's until the user buys tokens or subscribes. Once they subscribe you can remove ads. If they do not subscribe or buy tokens you can and must still show ads, its just that if they live within EU - and DO NOT CONSENT , then contextual and relevant ads must not be shown not must you allow tracking etc ... They will still get ads but just not relevant ads.
@@sabrinasalvador1420 Indeed, under the GDPR it is possible to show non-personalized ads if the user does not consent to tracking, but in the case of AdMob this is not the case. Despite the snippet of documentation you've shown me, AdMob does not show ads of any kind without consent. It's how the library is designed.
@DavidSerranoIO Emmm… Interesting - Could you possibly point me to your reference regarding 'AdMob does not show ads of any kind without consent" as I’m struggling to find full clarification on this.
Additionally, I have downloaded a number of apps and :
- Did not allow tracking
- Did not consent (When the GDPR dialog gets displayed)
I still received ads. Even if I go to ‘Manage Options’ and turn off all options (consent and legitimate interest) and do the same for the vendor screen etc. So either they haven’t used AdMob or they haven’t coded things correctly.
However, I have just researched this in Android and looked at the Android code and it does appear to validate everything you are saying. i.e if a user does not consent to GDPR then no ads should be shown) - this means users within the EU can effectively turn off ads for an app whilst the same users outside of the EU will still be served ads!
Based on your experience - What is the correct workflow when integrating Admob with ATT and GDPR consent ? i.e
Assuming user in EU :
1) Do you do GDPR consent first and then ATT
2) Do you do ATT and then GDPR
3) Do you do GDPR and if no consent dont do ATT
4) Do you do ATT and if no consent dont do GDPR
Assuming user outside of EU
1) Just do ATT
Would appreciate your thoughts on this - also, FYI , I am using this plugins now :
User messaging platform
App tracking transparency
Since the UMP SDK simplifies things somewhat.
@@sabrinasalvador1420 My advice is that you manage the ATT dialog also from google_mobile_ads. It can be configured from the AdMob console, and the library itself will be in charge of requesting it at the correct time, both for users in the EU and outside. You don't need to use a dedicated plugin for the ATT dialog, google_mobile_ads handles it all.
really appreciated, this was helpful
Thx for watching!
Thank you for a great intro to the GDPR implementation. My question, your example shows how to integrate and display GDPR screen that is created in Privacy & Messaging. However, assuming we also want to cater for iOS 14.x users and enable tracking and consequently show the IDFA explainer to our iOS 14.x users, can you advise how this will be achieved?
Mh good question, unfortunately I have not come across that specific case so I would not know how to guide you, of course the system dialogue is not going to work. I imagine that you would have to make a completely custom implementation for those users.
@@DavidSerranoIO Yes, we would need to check for iOS 14.x and that ATT hasnt been determined, then the most simplest way is to just handle the dialog in Flutter - once the users close the custom handle rolled flutter IDFA explainer dialog, we then launch the ATT system dialog.
very good and thank you so much.
You're welcome!!
@@DavidSerranoIO it return obtained for both consent and dont consent which load the ads in both case how to fix that ?
Thank you David. Source code would help ;)
😍😍😍
beautiful
Thx!
Realmente funciona, muchas gracias👍
De nada!
How to check whether the user consent to GDPR or not?
In principle you should not access that data. But in case you want to do it, you can use the variables that the UMP saves in the shared preferences using the mechanism that I explain in the video.
Me sirvió. Gracias! 😇😇😇
De nada 😊!
isConsentFormAvailable() returns false; any ideas why? I have saved the form, and also tried enabling the debug to pretend to be within EU (even though I already am).
If I remember correctly, there are several reasons why the form may not be available. I seem to remember that one of them is an incorrect configuration in AdMob. I recommend that you look at the official documentation to review the entire process.
@David Serrano it return obtained for both consent and not consent and it load the ads in both case
any chance you could do a video how to do all of this inside unity 2023 ?
I'm afraid not, I have no idea how to implement it in Unity.
I am trying to force the device to be outside Eea with debugGeographyNotEea but it still appears? I deleted the app but it still showing that I am in Eea? do you have any advice?
I see, check your settings, if you are indicating that you are not in Europe then the SDK should tell you that it is not necessary to show the message. Alternatively, you can always try a VPN outside of Europe to see if it happens the same.
In your Try specifying : DebugGeography.debugGeographyNotEea and also include your test device : ["FA7243A34D1C922CA3D78F2AE7T620GG"]
This is what worked for me.
Some texts disappeared in the above comment. here is the code
consentDebugSettings: ConsentDebugSettings(
debugGeography: DebugGeography.debugGeographyNotEea,
testIdentifiers: ["FA7243A34D1C922CA3D78F2AE7T620GG"]
),
how to stop the ads or show the ads , it stops but after i come back to page it shows the ads again altho it was denied
Where is admob_consent_dialog? It is referenced in the tutorial for initialization_screen.dart but there no mention of how to add admob_consent_dialog
admob_consent_dialog is the name of the test application that I am showing. It is not a dependency. To do the implementation as I do, you must create initialization_screen.dart and ultimately, follow the tutorial as I explain it.
Why there are no ads if the user does not consent?
It's a design decision by Google.
@@DavidSerranoIO this is a disaster! Is there any way to show non-personalized ads when users do not consent?
@@andreashadjithoma1410 As far as I know it is not possible. You would have to use another ad network in that case.
bro its not working... section 3... dailog is not showing...
Review your implementation carefully. Several people have followed this guide and it has helped them. If you have a specific problem, explain it in detail and we will see if we can help you.
My Like & Subscribe, thx really appreciated
You're welcome! And thanks for the subscribe!
Can you please provide the code base?
Unfortunately I do not have any project to share, however the instructions I give are mere guidelines, the final implementation will depend a lot on each person's application.
i would like you to give access to the code you write
Keep in mind that the instructions I explain in the video are indicative, the final implementation will vary depending on how you have implemented your application.
@@DavidSerranoIO Yes but it would be more straightforward to modify your code to requirements rather than copy it out from the video.
gimme full codes plz
If the dialog is not showing up then add your testId in the params like
final params = ConsentRequestParameters(
consentDebugSettings: ConsentDebugSettings(
testIdentifiers: [My test Id Here],
debugGeography: DebugGeography.debugGeographyEea,
),
);
hi but it return obtained for the both consent and dont consent ?
at last, normal english explanation without "assamaleikum vashmallah shashmallah" ))
without assamakeikum? Seems you have so much problem with one word lol
@@mmkamal the problem is when barely speaking people start teaching others and fill youtube with their trash content lol
Wow so much bs just to show that little popup.
If you do this as a hobby, it is possible that just showing the popup will be enough. This video is aimed at professionals and companies that want to do this implementation seriously, taking into account all the relevant factors.
@@DavidSerranoIO Not really sure what you want to say...all I can do is repeat my original comment. So much bs just to show that little popup. I'm surprised google didn't make it simpler for something that just asks for your consent or not.
Hello, I'm very interested in this tutorial. I believe it explains the process of implementing the AdMob UMP SDK in Flutter with the GDPR dialog quite well. It's the only tutorial I've found, and it explains things clearly. However, being at a medium level, I find it a bit challenging. I've been trying for almost a month, but I always encounter an error. I haven't found the line 'builder: (context) => const MainScreen(),' anywhere. Could you please help me understand where to insert '.. => const InitializeScreen(targetWidget: XXXX()),);' in my main.dart file?. Please.
MAIN.DART
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'flutter_flow/flutter_flow_theme.dart';
import 'flutter_flow/flutter_flow_util.dart';
import 'flutter_flow/internationalization.dart';
import 'flutter_flow/nav/nav.dart';
import 'index.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
usePathUrlStrategy();
await FlutterFlowTheme.initialize();
runApp(MyApp());
}
class MyApp extends StatefulWidget {
// This widget is the root of your application.
@override
State createState() => _MyAppState(); ///_MyAppState(); /////////////////////
static _MyAppState of(BuildContext context) =>
context.findAncestorStateOfType()!;
}
class _MyAppState extends State {
Locale? _locale;
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
late AppStateNotifier _appStateNotifier;
late GoRouter _router;
@override
void initState() {
super.initState();
_appStateNotifier = AppStateNotifier.instance;
_router = createRouter(_appStateNotifier);
}
void setLocale(String language) {
setState(() => _locale = createLocale(language));
}
void setThemeMode(ThemeMode mode) => setState(() {
_themeMode = mode;
FlutterFlowTheme.saveThemeMode(mode);
});
@override
Widget build(BuildContext context) {
return MaterialApp.router(
title: 'UMP SDK Dialog GDPR PRUEBA D. Serrano',
localizationsDelegates: [
FFLocalizationsDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
locale: _locale,
supportedLocales: const [Locale('en', '')],
theme: ThemeData(
brightness: Brightness.light,
scrollbarTheme: ScrollbarThemeData(),
),
darkTheme: ThemeData(
brightness: Brightness.dark,
scrollbarTheme: ScrollbarThemeData(),
),
themeMode: _themeMode,
routerConfig: _router,
);
}
}