docs-devsite/analytics.consentsettings.md
Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
Consent status settings for each consent type. For more information, see the GA4 reference documentation for consent state and consent types<!-- -->.
<b>Signature:</b>
export interface ConsentSettings
| Property | Type | Description |
|---|---|---|
| ad_personalization | ConsentStatusString | Sets consent for personalized advertising. |
| ad_storage | ConsentStatusString | Enables storage, such as cookies, related to advertising |
| ad_user_data | ConsentStatusString | Sets consent for sending user data to Google for advertising purposes. |
| analytics_storage | ConsentStatusString | Enables storage, such as cookies, related to analytics (for example, visit duration) |
| functionality_storage | ConsentStatusString | Enables storage that supports the functionality of the website or app such as language settings |
| personalization_storage | ConsentStatusString | Enables storage related to personalization such as video recommendations |
| security_storage | ConsentStatusString | Enables storage related to security such as authentication functionality, fraud prevention, and other user protection. |
Sets consent for personalized advertising.
<b>Signature:</b>
ad_personalization?: ConsentStatusString;
Enables storage, such as cookies, related to advertising
<b>Signature:</b>
ad_storage?: ConsentStatusString;
Sets consent for sending user data to Google for advertising purposes.
<b>Signature:</b>
ad_user_data?: ConsentStatusString;
Enables storage, such as cookies, related to analytics (for example, visit duration)
<b>Signature:</b>
analytics_storage?: ConsentStatusString;
Enables storage that supports the functionality of the website or app such as language settings
<b>Signature:</b>
functionality_storage?: ConsentStatusString;
Enables storage related to personalization such as video recommendations
<b>Signature:</b>
personalization_storage?: ConsentStatusString;
Enables storage related to security such as authentication functionality, fraud prevention, and other user protection.
<b>Signature:</b>
security_storage?: ConsentStatusString;