Important: If either the ad_storage or analytics_storage consent parameter is set to denied, through a default consent state or the setConsent method, the analytics data associated with a particular app instance is permanently reset going forward. For example, if analytics data is reset for all app instances, user counts may be inflated.
If you use the Google Analytics for Firebase iOS SDK, you can prevent this issue by updating the iOS SDK to version 10.23.0. If you use the Android SDK, you can prevent this issue by following these steps:
- Don't set default values for ad_storage and analytics_storage in your app's manifest.
- Disable Analytics collection before setting the app instance’s ad_storage and analytics_storage consent state.
- After you have affirmative consent, re-enable Analytics collection, which won't reset Analytics data.
If you want to reset analytics for an app instance, use the purpose-built API. See here for an Android example.
We will release an update for the Google Analytics for Firebase Android SDK in the coming weeks to adjust this behavior, after which you can update your SDK and consider whether further consent mode changes are appropriate for your app.
Overview: Consent mode parameters
Consent Type | Description |
ad_storage | Enables storage (such as cookies) related to advertising. |
ad_user_data | Sets consent for sending user data related to advertising to Google. |
ad_personalization | Sets consent for personalized advertising. |
analytics_storage | Enables storage (such as cookies) related to analytics e.g. visit duration. |
In addition to the consent mode parameters, there are the following privacy parameters:
Storage Type | Description |
functionality_storage | Enables storage that supports the functionality of the website or app e.g. language settings. |
personalization_storage | Enables storage related to personalization e.g. video recommendations |
security_storage | Enables storage related to security such as authentication functionality, fraud prevention, and other user protection. |
Tag behavior with consent mode
If all consent options are granted
, tags behave as follows:
Web |
Mobile apps |
|
|
When one or more forms of consent are not granted (not set or denied
), there are additional behaviors to consider:
|
Web & Mobile apps |
Personalized advertising is disabled, the following features won't receive data:
|
|
Web & Mobile apps |
Personal data collection for online advertising is disabled, including:
|
|
|
Web |
Mobile apps |
|
|
|
|
Web |
Mobile apps |
|
|
Web & Mobile apps When Cookieless pings, as part of regular HTTP/browser communication, may include the following information: user agent, screen resolution, IP address. Note that Google Analytics 4 does not store or log IP addresses. If an advertiser sets other fields, such as user_id and custom dimensions, they will be sent normally. The data collected in the cookieless ping is used for behavioral and conversion modeling, to fill the gaps in your data. |
|
Web |
|