Set up IAB TCF and Google Additional Consent
Turn on IAB TCF for a banner, configure vendors and publisher restrictions, and add Google Additional Consent.
Sidst opdateret:
IAB TCF is for publishers who work with advertising vendors that require a Transparency and Consent Framework consent string. It applies to visitors in the EEA, the UK and Switzerland. CookieBeam's IAB Europe CMP ID is 526.
TCF adds a vendor list and a second consent layer to the banner. Most sites do not need it. Turn it on only if your programmatic advertising partners ask for a TC string.
Registration as a CMP does not by itself make processing lawful. Each organisation assesses its own compliance.
Before you start
- Plan: Professional or above. The feature is gated on the IAB TCF and GPP entitlement.
- Runtime: TCF runs only on the current banner runtime. Banners last published before September 2026 must be republished to get TCF.
Turn on TCF
- Open the banner in the dashboard and go to the Consent tab.
- Under Consent frameworks, open the Frameworks section.
- Switch on Use IAB TCF v2.4 for this banner.
- Enter the Publisher country code: the two-letter country of the business that runs the site. It is written into the TC string.
When TCF is on, an advisory readiness checklist appears. It checks six things: publisher country set, vendor selection made, Google Advertising Products (vendor 755) included, choices can be reopened on every page, Accept all / Reject all button contrast of at least 5:1, and published since the last TCF change. Nothing on the checklist blocks saving or publishing.
Apply TCF to all visitors is off by default. When off, TCF applies only to visitors in TCF countries (EEA, UK, Switzerland) and to visitors whose country is unknown. When on, it applies everywhere.
Choose vendors
Two options:
- Only the vendors I select (default): a searchable Global Vendor List picker. IDs not on the current GVL are flagged. At least one vendor is required.
- All Global Vendor List vendors: every vendor on the list is shown and can receive consent. Each time IAB adds a vendor, every visitor who already made a choice is asked again.
Only vendors shown to the visitor can receive consent.
Google Advertising Products (vendor 755)
If the site serves Google ads, select vendor 755 (Google Advertising Products). The readiness checklist warns when it is missing. Without it, Google rejects the TC string, so its ads may not serve.
Publisher restrictions
Restrict what a vendor may do on the site. Each row takes a vendor ID, a purpose and a restriction type:
- Not allowed: the vendor cannot use that purpose.
- Require consent: the vendor must have consent, even if the vendor declares the purpose as flexible.
- Require legitimate interest: the vendor must rely on legitimate interest.
Purposes 1 and 3 to 6 cannot use legitimate interest. Each restricted vendor must be among the vendors shown to visitors. Changing restrictions makes returning visitors choose again.
Google Additional Consent
Google Additional Consent (AC) asks for consent for Google ad technology providers that are not on the Global Vendor List.
- Switch on Google Additional Consent.
- In the Google ad technology providers field, enter provider IDs separated by commas. These are Google's Ad Tech Provider (ATP) IDs from Google's published list. They are not GVL vendor IDs.
Copy the IDs from Google's CSV. The dashboard checks every ID against Google's published list when you save; an ID not on the list is refused. Only listed IDs ever appear in the Additional Consent string.
Leave the field empty to disclose no providers. Turning the toggle off clears the scope.
Adding a provider later does not re-prompt returning visitors. The new provider gets no consent from existing visitors until they make a new choice. Removing a provider drops it from returning visitors' strings on their next page view.
CookieBeam refreshes its copy of Google's ATP list daily from Google's published CSV.
What visitors see
First layer
The banner shows "We and our N partners" with a link to the full partner list. It lists the IAB purposes or stacks, the special features, and the legitimate-interest and special-purposes notices. Purpose names and descriptions come from the Global Vendor List.
The partner count includes TCF vendors, the banner's own services, and the Google ad technology providers in scope.
Buttons
- Accept all consents to the purposes and vendors shown, the declared special features, and all scope ATPs when the
marketingcategory is accepted. - Reject all withdraws every consent and objects to every legitimate interest.
Settings panel
Two tabs: purposes and partners.
The partners tab lists:
- The searchable IAB vendor list.
- The banner's own non-IAB services as a separate group.
- When AC is on with a non-empty scope, a Google Ad Tech Providers section with a search box and one row per provider. Each row shows the name, a privacy-policy link, and a consent switch (off by default). Providers without their own privacy policy link to Google's Additional Consent page.
Storage
The banner discloses the following storage in the settings panel:
| Name | Type | Duration |
|---|---|---|
euconsent-v2 | Cookie | 365 days |
| The consent cookie | Cookie | As configured |
cb_tcf_state | Local storage | Until changed |
IABTCF_AddtlConsent (when AC is on) | Local storage | Until changed |
Reopening choices
Visitors must be able to reopen choices on every page. Two ways: the floating settings button, or a link pointing to #cookiebeam-preferences.
Publish the banner
Settings take effect only after the banner is published. After saving TCF settings, the readiness checklist shows whether the banner needs publishing.
Click Save TCF settings, then publish. The save confirmation says: "TCF settings saved. Publish the banner to apply them."
Script loading order
Load the CookieBeam script before ad tags (Prebid, GPT, header bidding wrappers). The __tcfapi stub ships inside the CookieBeam loader. A tag that runs before the CookieBeam script finds no __tcfapi at all.
Tags that load after the CookieBeam script can call __tcfapi straight away. The stub queues their calls until the full CMP is ready, then replays them. The stub answers ping itself. If the full CMP fails to load, the stub answers every subsequent command with cmpStatus: 'error' instead of leaving vendors hanging.
Re-consent
The stored TC string is discarded and the consent UI shown again when any of these happens:
- The string's TCF policy version differs from the latest GVL's.
- The string cannot be decoded.
- The banner now discloses a vendor the string did not include.
- The publisher restrictions for the disclosed vendors changed.
A GVL version change alone does not trigger re-consent. However, when the vendor mode is All Global Vendor List vendors, a vendor newly added to the GVL counts as a newly disclosed vendor (see Choose vendors).
Visitors can change their choices whenever they reopen the consent UI (see Reopening choices). The TC string is regenerated on each change.
Verify on a live page
Open a browser in the target geography and call the TCF API:
__tcfapi('ping', 2, (data) => {
console.log('cmpId:', data.cmpId) // 526
console.log('gdprApplies:', data.gdprApplies)
console.log('cmpStatus:', data.cmpStatus)
})
After a visitor makes a choice:
__tcfapi('getTCData', 2, (data, success) => {
console.log('tcString:', data.tcString)
console.log('addtlConsent:', data.addtlConsent) // when AC is on with providers in scope
console.log('eventStatus:', data.eventStatus) // 'useractioncomplete' right after the click
})
A returning visitor's page load produces eventStatus tcloaded.
Check that:
cmpIdis526.gdprAppliesmatches the visitor's geography.tcStringis present after a choice and decodes correctly. Use IAB Europe's TC string decoder to inspect it.addtlConsentis present when Additional Consent is on and at least one provider is in scope. The format is2~<consented IDs>~dv.<disclosed IDs>. No ID appears in both sections.- Vendor 755 is in the disclosed vendors and, after Accept all, in the vendor consents.
Use addEventListener to confirm the API sends updates on every change:
__tcfapi('addEventListener', 2, (data, success) => {
console.log('eventStatus:', data.eventStatus)
})
Google certification
CookieBeam is a Google-certified CMP. Publishers who serve personalised ads with Google AdSense or Ad Manager to visitors in the EEA, the UK and Switzerland must use a Google-certified CMP that integrates with IAB TCF. CookieBeam meets that requirement when TCF is turned on for the banner. TCF is available on Professional plans and above.
Google's certification programme is separate from IAB Europe's TCF registration. CookieBeam holds both: registered CMP in the TCF (CMP ID 526) and Google-certified CMP. For details on Google's publisher requirements, see Google's publisher requirements.
Limits
- Web only. There is no mobile-app SDK or connected-TV support.
- Canadian TCF (GPP Section 5) is not available. It requires a separate IAB Canada CMP registration.
- Google Additional Consent v1 is not produced. Only v2.
- Purpose One Treatment is not configurable in the dashboard.