Triển khai Khuôn khổ về tính minh bạch và sự đồng ý
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trang này dành cho những nhà phát triển nền tảng quản lý sự đồng ý (CMP) muốn sử dụng
Khuôn khổ về tính minh bạch và sự đồng ý (TCF) để truyền các tín hiệu về sự đồng ý đến các thẻ Google.
Khuôn khổ về tính minh bạch và sự đồng ý (TCF) của IAB là một khung kỹ thuật tiêu chuẩn mở cho phép các trang web, nhà quảng cáo và đại lý quảng cáo nhận, ghi lại và cập nhật sự đồng ý của người tiêu dùng cho các trang web.
Bạn có thể bật tính năng tích hợp TCF của chế độ đồng ý bằng một trong các
phương thức sau.
CMP API
Đặt trường enableAdvertiserConsentMode thành true trong các đối tượng TCData do hoạt động triển khai API nền tảng quản lý sự đồng ý theo TCF của bạn tạo ra.
TCData.enableAdvertiserConsentMode = true
Trang web
Để bật tính năng hỗ trợ TCF, hãy đặt thuộc tính này thành true trên mỗi trang web sẽ hỗ trợ TCF, ngay cả trên các trang được tải thông qua iframe.
window['gtag_enable_tcf_support'] = true
Ứng dụng
CMP có thể tự động bật các tính năng tích hợp TCF. Bạn có thể tắt tính năng tích hợp bằng cách cập nhật tệp AndroidManifest.xml (Android) hoặc info.plist (iOS).
Hành vi tích hợp Khuôn khổ về tính minh bạch và sự đồng ý (TCF)
Thẻ Google và SDK Google Analytics cho Firebase chỉ chấp nhận những chuỗi TCF được triển khai đúng cách theo chính sách và quy cách kỹ thuật của TCF, đồng thời tuân thủ Chính sách về sự đồng ý của người dùng ở Liên minh Châu Âu của Google.
Đối với các hoạt động tích hợp thẻ web, nếu CMP không phản hồi trong vòng 500 mili giây hoặc bạn thấy trạng thái "lỗi", "mã giả lập" hoặc "đang tải", thì thẻ sẽ tiếp tục với chế độ cài đặt đồng ý mặc định.
[null,null,["Cập nhật lần gần đây nhất: 2024-11-09 UTC."],[[["\u003cp\u003eThis guide helps Consent Management Platform (CMP) developers implement the Transparency & Consent Framework (TCF) to send consent signals to Google tags, allowing websites to obtain and manage user consent for data processing.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can enable TCF integration by setting the \u003ccode\u003eenableAdvertiserConsentMode\u003c/code\u003e field to \u003ccode\u003etrue\u003c/code\u003e in their CMP's \u003ccode\u003eTCData\u003c/code\u003e objects or by setting \u003ccode\u003ewindow['gtag_enable_tcf_support'] = true\u003c/code\u003e on their websites.\u003c/p\u003e\n"],["\u003cp\u003eGoogle tags and the Google Analytics for Firebase SDK only process TCF strings compliant with TCF policies and Google's EU User Consent Policy, using default settings if a CMP doesn't respond within 500 milliseconds or returns an error.\u003c/p\u003e\n"],["\u003cp\u003eTCF Purposes are mapped to consent mode commands, impacting Google tag behavior when specific purposes (like storing information or personalizing ads) are denied by the user.\u003c/p\u003e\n"]]],["CMP developers using the TCF framework can transmit consent signals to Google tags by enabling consent mode TCF integration. This can be done via the CMP API (setting `enableAdvertiserConsentMode` to `true`), website configuration (`window['gtag_enable_tcf_support'] = true`), or app settings. The integration maps TCF Purposes to consent mode commands, such as denying `ad_storage`, `ad_user_data`, and `ad_personalization`. Google tags will default to consent settings if the CMP fails to respond in 500ms or returns an error.\n"],null,["# Implement the Transparency & Consent Framework\n\n\u003e This page is for consent management platform (CMP) developers who want to use\n\u003e the TCF framework to transmit consent signals to Google tags.\n\nThe IAB Transparency \\& Consent Framework (TCF) is an open-standard technical\nframework that enables websites, advertisers, and ad agencies to obtain, record,\nand update consumer consent for web pages.\n\nTo control Google Analytics cookies, [integrate with consent mode](https://developers.google.com/tag-platform/security/concepts/cmp).\n| **Important:** Google's TCF integration was updated in November 2023 to map to the new consent parameters `ad_user_data` and `ad_personalization`.\n\nEnable consent mode TCF integration\n-----------------------------------\n\nYou can enable the consent mode TCF integration using either of the following\nmethods. \n\n### CMP API\n\n\nSet the `enableAdvertiserConsentMode` field to `true` in `TCData`\nobjects generated by your TCF consent management platform API implementation. \n\n TCData.enableAdvertiserConsentMode = true\n\n### Website\n\n\nTo enable TCF support, set the property to `true` on each website that should\nsupport TCF, even on pages that are loaded through an `iframe`. \n\n window['gtag_enable_tcf_support'] = true\n\n### Apps\n\n\nTCF integrations may be automatically enabled by your CMP. You can disable the\nintegration by updating your `AndroidManifest.xml` (Android) or `info.plist`\n(iOS) file.\n\nFor Android: \n\n \u003cmetadata android:name=\"google_analytics_tcf_data_enabled\" android:value=\"false\" /\u003e\n\nFor iOS: \n\n \u003ckey\u003eGOOGLE_ANALYTICS_TCF_DATA_ENABLED\u003c/key\u003e \u003cfalse/\u003e\n\nTCF integration behavior\n------------------------\n\nThe Google tag and the Google Analytics for Firebase SDK only accept TCF strings\nthat are correctly implemented according to the TCF policies and technical\nspecifications, and adhere to Google's EU User Consent Policy.\n\nFor web tag integrations, if the CMP doesn't respond within 500 milliseconds or\nyou see \"error\", \"stub\", or \"loading\" status, the tag will proceed with default\nconsent settings.\n\nLearn how to [troubleshoot TCF implementations](https://support.google.com/admanager/answer/9999955).\n\nWhen enabled, the consent mode TCF integration maps from TCF Purposes to consent\nmode commands as follows.\n\n\u003cbr /\u003e\n\n| Purpose | Description | Google tag behavior when Purpose is denied |\n|---------|-----------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | Store and/or access information on a device. | `ad_storage = denied` `ad_user_data = denied` |\n| 3 | Create a personalised ads profile | `ad_personalization = denied` |\n| 4 | Select personalized ads | `ad_personalization = denied` |\n| 7 | Measure ad performance | `ad_user_data = denied` Disables the [Google signals](https://support.google.com/analytics/answer/9445345#enabling) feature in Google Analytics (for web tags only). |\n| 9 | Apply market research to generate audience insights | Disables the [Google signals](https://support.google.com/analytics/answer/9445345#enabling) feature in Google Analytics (for web tags only). |\n| 10 | Develop and improve products | Disables the [Google signals](https://support.google.com/analytics/answer/9445345#enabling) feature in Google Analytics (for web tags only). |\n\n\u003cbr /\u003e\n\nNext steps\n----------\n\nIf you plan to provide your customers with a tag they can use in Google Tag\nManager, [create a tag template](/tag-platform/tag-manager/templates) for your banner.\n\nRelated links\n-------------\n\n- [IAB Europe Transparency \\& Consent Framework Policies](https://iabeurope.eu/iab-europe-transparency-consent-framework-policies/)\n- [Troubleshooting TCF implementation](https://support.google.com/admanager/answer/9999955)"]]