flutterfire
flutterfire copied to clipboard
🐛 [firebase_analytics] Implement consent mode v2
As per https://developers.google.com/tag-platform/security/guides/app-consent?platform=ios the recommended way to set user consent is consent mode v2, which enables toggling the following four individual properties.
AD_PERSONALIZATION | Sets consent for personalized advertising.
AD_STORAGE | Enables storage (such as device identifiers) related to advertising.
AD_USER_DATA | Sets consent for sending user data to Google for advertising purposes.
ANALYTICS_STORAGE | Enables storage (such as app identifiers) related to analytics, e.g. visit duration.
In the firebase_analytics
plugin, the setConsent
method signature is
/// Sets the applicable end user consent state. 'default' value for 'adStorageConsentGranted' & 'analyticsStorageConsentGranted' is 'true'
Future<void> setConsent({
bool? adStorageConsentGranted,
bool? analyticsStorageConsentGranted,
})
exposing only two of the four above mentioned properties.
Please update firebase_analytics
in flutterfire
to support Google consent mode v2.
There are major marketing implications for tons of of apps out there if we cannot implement the consent mode v2. I hope you guys can make it a priority. Thanks for your work!
To raise attention, I'd also like to leave a comment here. For us it's also crucial to use V2 soon. Maybe you can roughly estimate when this will be implemented, so that we know that we might need to use workarounds before we go live.
I'm facing the same problem, please make this a priority to implement the consent mode v2.
I can also only emphasize, that it is crucial for us that we have support for setting these additional consent flags prior to the rollout of Google Consent Mode V2 in March 2024.
As an update, we are planning on updating the API for the above mentioned, we're just going through an API review before implementing. I will let you know when it is released 🙏
@russellwheatley I began implementing this yesterday and have already submitted a pull request today. Would you prefer that I proceed with further enhancements, or do you currently have an open pull request in progress internally?
@matinzd - I have the bones of a PR which is on hold until we decide on API. Happy to proceed with your PR once decided if you care to update when the time to implement arrives 😄
@russellwheatley I am available as soon as you have the internal discussions resolved. Just ping me in the PR.
this setConsent is not valid for FLutter web, how can I set consent in flutter web?
@JgomesAT - It will be allowed in upcoming PR. See docs
Great news
any schedule, for when that will be ready
@russellwheatley Would you please let me know when you are planning for upcoming PR? Because our product highly depends on Analytics in EU region. Thanks for your support and contribute to this.
@russellwheatley what is the final status about this? There is a deadline to implement Consent Mode V2 for 6. March, and there is no official solution for Flutter Apps.
@ibrahimdevs I've done customisation in the local and the package works fine for me.
Firebase analytics : 10.8.6
I've played around above mention version so please be careful If you have another version in your project.
Integrate into your project using this fork URL https://github.com/firebase/flutterfire/compare/master...nitinrgadhiya:flutterfire:consent_v2
Please review the changes from the GitHub fork, understand their purpose, and integrate them into the original project. If you have any questions, reach out to me.
Hey everyone, sorry for the delay. We have the green light for this API update.
@matinzd - let me know if you wish to proceed with your PR. I've provided some feedback 😄
@russellwheatley thanks for addressing this! Great help. Could you give us some hints on the release ETA?
@szepeshazi - Hopefully today, definitely tomorrow 👍