Important: If the ad_storage or analytics_storage consent parameter is set to denied, either 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.
- iOS: you can prevent this issue by updating to version 10.23.0 or later.
- Android: devices with Google Play Services have automatically received an update, and those devices are no longer subject to this issue. No further action is required on your part.
If your app runs on devices without Google Play Services, you will be able to update the Android SDK in the forthcoming 22.0.1 release to prevent this behavior. Until then, you can prevent the issue for these devices 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.
- Once 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.
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 |
|