Skip to content

Commit 7abec92

Browse files
committed
fix: pipe args from the main delegate and update docs
1 parent 2ae45c6 commit 7abec92

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/firebase_analytics/firebase_analytics/lib/src/firebase_analytics.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,41 @@ class FirebaseAnalytics extends FirebasePluginPlatform {
128128
/// Sets the applicable end user consent state.
129129
/// By default, no consent mode values are set.
130130
///
131+
/// - [adStorageConsentGranted] - Enables storage, such as cookies, related to advertising. (Platform: Android, iOS, Web)
132+
/// - [analyticsStorageConsentGranted] - Enables storage, such as cookies, related to analytics (for example, visit duration). (Platform: Android, iOS, Web)
133+
/// - [adPersonalizationSignalsConsentGranted] - Sets consent for personalized advertising. (Platform: Android, iOS, Web)
134+
/// - [adUserDataConsentGranted] - Sets consent for sending user data to Google for advertising purposes. (Platform: Android, iOS)
135+
/// - [functionalityStorageConsentGranted] - Enables storage that supports the functionality of the website or app such as language settings. (Platform: Web)
136+
/// - [personalizationStorageConsentGranted] - Enables storage related to personalization such as video recommendations. (Platform: Web)
137+
/// - [securityStorageConsentGranted] - Enables storage related to security such as authentication functionality, fraud prevention, and other user protection. (Platform: Web)
138+
///
131139
/// Default consents can be set according to the platform:
132140
/// - [iOS][1]
133141
/// - [Android][2]
142+
/// - [Web][3]
134143
///
135144
/// [1]: https://developers.google.com/tag-platform/security/guides/app-consent?platform=ios#default-consent
136145
/// [2]: https://developers.google.com/tag-platform/security/guides/app-consent?platform=android#default-consent
146+
/// [3]: https://firebase.google.com/docs/reference/js/analytics.md#setconsent_1697027
137147
Future<void> setConsent({
138148
bool? adStorageConsentGranted,
139149
bool? analyticsStorageConsentGranted,
140150
bool? adPersonalizationSignalsConsentGranted,
141151
bool? adUserDataConsentGranted,
152+
bool? functionalityStorageConsentGranted,
153+
bool? personalizationStorageConsentGranted,
154+
bool? securityStorageConsentGranted,
142155
}) async {
143156
await _delegate.setConsent(
144157
adStorageConsentGranted: adStorageConsentGranted,
145158
analyticsStorageConsentGranted: analyticsStorageConsentGranted,
146159
adPersonalizationSignalsConsentGranted:
147160
adPersonalizationSignalsConsentGranted,
148161
adUserDataConsentGranted: adUserDataConsentGranted,
162+
functionalityStorageConsentGranted: functionalityStorageConsentGranted,
163+
personalizationStorageConsentGranted:
164+
personalizationStorageConsentGranted,
165+
securityStorageConsentGranted: securityStorageConsentGranted,
149166
);
150167
}
151168

0 commit comments

Comments
 (0)