Back to Firebase Js Sdk

ConsentSettings interface

docs-devsite/analytics.consentsettings.md

12.12.13.6 KB
Original Source

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 %}

ConsentSettings interface

Consent status settings for each consent type. For more information, see the GA4 reference documentation for consent state and consent types<!-- -->.

<b>Signature:</b>

typescript
export interface ConsentSettings 

Properties

PropertyTypeDescription
ad_personalizationConsentStatusStringSets consent for personalized advertising.
ad_storageConsentStatusStringEnables storage, such as cookies, related to advertising
ad_user_dataConsentStatusStringSets consent for sending user data to Google for advertising purposes.
analytics_storageConsentStatusStringEnables storage, such as cookies, related to analytics (for example, visit duration)
functionality_storageConsentStatusStringEnables storage that supports the functionality of the website or app such as language settings
personalization_storageConsentStatusStringEnables storage related to personalization such as video recommendations
security_storageConsentStatusStringEnables storage related to security such as authentication functionality, fraud prevention, and other user protection.

ConsentSettings.ad_personalization

Sets consent for personalized advertising.

<b>Signature:</b>

typescript
ad_personalization?: ConsentStatusString;

ConsentSettings.ad_storage

Enables storage, such as cookies, related to advertising

<b>Signature:</b>

typescript
ad_storage?: ConsentStatusString;

ConsentSettings.ad_user_data

Sets consent for sending user data to Google for advertising purposes.

<b>Signature:</b>

typescript
ad_user_data?: ConsentStatusString;

ConsentSettings.analytics_storage

Enables storage, such as cookies, related to analytics (for example, visit duration)

<b>Signature:</b>

typescript
analytics_storage?: ConsentStatusString;

ConsentSettings.functionality_storage

Enables storage that supports the functionality of the website or app such as language settings

<b>Signature:</b>

typescript
functionality_storage?: ConsentStatusString;

ConsentSettings.personalization_storage

Enables storage related to personalization such as video recommendations

<b>Signature:</b>

typescript
personalization_storage?: ConsentStatusString;

ConsentSettings.security_storage

Enables storage related to security such as authentication functionality, fraud prevention, and other user protection.

<b>Signature:</b>

typescript
security_storage?: ConsentStatusString;