On this page
What this issue is
The IAB Transparency and Consent Framework (TCF) is an industry standard used mostly in Europe. When a visitor makes a choice in your cookie banner, the banner (called a consent management platform, or CMP) builds a short encoded text called the TC string. It says which purposes and vendors the visitor agreed to.
Ad tags and vendors read that string through a browser function called __tcfapi. The string is usually also stored in a first-party cookie named euconsent-v2. The problem appears when the string is missing (never created), empty, expired, or invalid (wrong version, corrupted, or generated by an unregistered CMP).
Common causes: TCF mode is off in the CMP settings, the CMP script loads after the ad tags, the __tcfapi stub is missing from the page head, a caching or security plugin strips the cookie, or the CMP uses an outdated TCF version (v2.0 instead of v2.2).
Why it costs you leads or sales
Without a valid string, ad platforms and programmatic vendors cannot prove the visitor consented. They usually fall back to the safe option: no personalised ads, no conversion matching, or no ad at all. Google also expects a certified CMP with TCF for ads served in the EEA and UK.
The result is quieter than a broken form. Visitors still browse and buy, but remarketing audiences shrink, conversions go unreported and smart bidding has less data to learn from. You pay for traffic that the platforms cannot connect to results.
- Visitor clicks AcceptBanner records the choice
- TC string createdMissing or invalid
- Vendors read __tcfapiNo valid consent found
- Ads and conversionsLimited or not sent
The visitor consents, but the string is never created, so downstream steps lose the signal.
Example: illustrative numbers showing how conversions reported to an ad platform can recover once a valid TC string is passed.
How to check if your site has it
Open the site in a private window
Use an EU location or a VPN set to an EU country so the banner appears. Open DevTools (F12).
Test that __tcfapi exists
In the Console, type typeof window.__tcfapi. You should see "function". If you see "undefined", the CMP is not loading or TCF is off.
Accept in the banner, then read the string
Click Accept, then run the snippet below. Check that tcString is a non-empty text and gdprApplies is true for EU visitors.
Check the cookie
In DevTools go to Application, then Cookies, and look for euconsent-v2. Some CMPs store it elsewhere, such as local storage, so check their documentation.
Decode the string
Paste the string into a TC string decoder (the IAB Europe and several CMP vendors offer one). Confirm the version is 2, the CMP ID is yours and the purposes match your click.
window.__tcfapi('getTCData', 2, function (tcData, success) {
console.log('success:', success);
console.log('gdprApplies:', tcData.gdprApplies);
console.log('eventStatus:', tcData.eventStatus);
console.log('tcString:', tcData.tcString);
console.log('cmpId:', tcData.cmpId, 'version:', tcData.tcfPolicyVersion);
});| What you see | Likely meaning |
|---|---|
| __tcfapi is undefined | CMP not loaded, TCF disabled, or script blocked |
| success is false | CMP present but not ready or misconfigured |
| tcString is empty | No choice stored yet, or storage failed |
| eventStatus is cmpuishown | Banner shown but no choice made yet (normal) |
| Decoder shows unknown CMP ID | CMP not registered with the IAB |
How to fix it
Exact menu names depend on your CMP, so look for a setting called IAB TCF, TCF v2.2 or Transparency and Consent Framework. The steps below cover the common cases.
Confirm your CMP is TCF-registered
Check that your CMP appears on the IAB Europe CMP list and has a CMP ID. If it does not, switch to one that does.
Turn TCF on in the CMP dashboard
Enable the IAB TCF option, publish the configuration and select the vendors and purposes you use.
Load the CMP first
Place the CMP script as high as possible in the head, before Google Tag Manager, ad scripts and analytics. Do not add async or defer unless your CMP says it is safe.
Update to TCF v2.2
Older v2.0 or v2.1 strings are no longer accepted by many vendors. Update the CMP plugin or script to the latest version.
Stop anything stripping the cookie
Exclude the CMP script and the euconsent-v2 cookie from caching, security or cookie-cleaning plugins, and check that a CDN rule is not removing it.
Test again after clearing cookies
Clear site data, reload from an EU location, accept, and run the console check from the previous section.
Check the consent plugin settings
In your CMP plugin (for example one that supports IAB TCF), enable the TCF option and save. Update the plugin to the latest version.
Exclude from caching and minify
In your cache or optimisation plugin, exclude the CMP script from delay, defer and combine options so it loads first.
Fire the CMP tag first
Use the CMP's template from the Community Template Gallery if it has one, and set it on the Consent Initialization trigger so it runs before other tags.
Enable consent checks on ad tags
In Admin, Container settings, turn on consent overview and set required consent for ad tags in each tag's Consent Settings.
Use a TCF-capable consent app
Shopify's built-in banner is not a TCF CMP. Install a consent app that supports IAB TCF and enable that option in the app settings.
Check theme placement
If the app needs a snippet in theme.liquid, put it high in the head before other tracking scripts.
Add the CMP script in head code
In Site settings, Custom code, Head code, paste the CMP script above other tracking scripts, then publish.
Check what your banner supports
Wix's built-in banner may not offer TCF. If you need it, add a TCF-registered CMP through custom code in Settings, Custom code, set to load in the head.
Inject the CMP in header code
In Settings, Advanced, Code injection, add the CMP script to the Header field. Custom code needs a plan that allows code injection.
Place the CMP script first in head
Add the vendor's script before all other scripts, with the __tcfapi stub it provides, and do not defer it.
How to confirm it's fixed
- typeof window.__tcfapi returns "function" on page load
- getTCData returns success true and a non-empty tcString after Accept
- gdprApplies is true for an EU visitor
- The decoder shows version 2 and your CMP ID
- The euconsent-v2 cookie exists after a choice and survives a page reload
- After Reject all, the string shows purposes denied and ad tags do not send data
- Google tag diagnostics or your ad platform's consent status no longer reports missing consent
How to prevent it happening again
- Re-run the console check after every CMP, theme, plugin or tag manager change
- Keep the CMP plugin or script updated to the current TCF version
- Subscribe to your CMP vendor's notices about TCF policy updates
- Keep the CMP at the top of the head and out of delay or defer rules
- Test from an EU location, not just from your own country
- Add a quarterly check to your launch checklist for new pages and domains
How FunnelGuard handles this
FunnelGuard does not check TCF strings yet. Validating the TC string is a possible future check, but today it is not something FunnelGuard tests.
What FunnelGuard does do is run your real customer journeys on a schedule from the EU or the US and check that the tracking hits to GA4, Google Ads, Meta and other platforms are actually sent. If a consent problem leaves a conversion hit missing, a failed step is re-checked from a second region and you get one alert with a screenshot and a likely cause. That tells you the symptom, not that the TC string is the reason.
To watch for the TCF problem itself, run the console check above after each release, use your CMP's own dashboard or consent reports, and review the consent status in your ad platform's diagnostics. A free plan with 1 site and 2 journeys is available if you want automated tracking checks alongside.
Questions people ask
What is a TCF string?
A TCF string, or TC string, is a coded line of text created by a cookie banner that follows the IAB Transparency and Consent Framework. It records which purposes and vendors a visitor accepted or rejected. Ad vendors read it to decide what they may do with that visitor's data.
Why is my TCF string missing?
The usual causes are TCF mode being switched off in your CMP, the CMP script loading after ad tags or being blocked, or a cache or security plugin removing the euconsent-v2 cookie. It can also be empty simply because the visitor has not made a choice yet.
How do I check if my TCF string is valid?
Open DevTools in an EU location, accept the banner, and run window.__tcfapi('getTCData', 2, callback) in the console. A valid result has success true, gdprApplies true and a non-empty tcString. Paste the string into a TC string decoder to confirm version 2 and your CMP ID.
Where is the TCF string stored?
Most CMPs store it in a cookie named euconsent-v2, and some also use local storage. Vendors normally read it through the __tcfapi function rather than the cookie directly. Check your CMP's documentation if you cannot find it.
Do I need TCF for Google Ads?
For serving ads to users in the EEA and UK, Google requires a Google-certified CMP, and publishers using Google ad products with TCF need a compliant string. Check Google's current requirements for your setup, since they are updated over time.
Why does the TCF string show gdprApplies false?
The CMP is treating the visitor as outside the regions where GDPR applies, often because of geolocation rules or because you tested from outside the EU. Test from an EU location and review the region rules in your CMP settings.
Can FunnelGuard detect an invalid TCF string?
No. FunnelGuard does not check TCF strings yet. It does run your journeys and check tracking hits, so it can show that conversions are not being sent, but you need the console check or your CMP's reports to confirm the string itself.
Related issues
- TRK-296CMP script fails to load, blocking all tagsFix guide
- TRK-299Google-certified CMP not used (required for EEA ads)Fix guide
- TRK-284Consent Mode v2 not implemented (no gcs/gcd)Fix guide
- TRK-298CMP categorises analytics tag wrongly (necessary vs marketing)Fix guide
- TRK-304Consent choice not remembered across pagesFix guide
- TRK-303Cookies set before consent (_ga, _fbp)Fix guide