Fix guide · Framer · medium · about 30 min
TikTok Pixel not firing after consent on Framer: how to fix
For the finding “TikTok Pixel does not fire after consent”. Also for: Any website, Shopify, WordPress, Webflow.
What this means
The TikTok Pixel script is on your Framer site, but after cookies were accepted, no events were sent to TikTok. As far as TikTok can tell, this page has no visitors.
Why it costs you money:
- TikTok cannot see page views or conversions from this page, so campaigns optimize without data and reported results are too low.
- Audiences built from website visitors stop growing.
How sure we are: if our checker found and accepted your cookie banner, this is reported as critical. If we did not find a banner we could operate, it is reported as high: the pixel may be waiting for a consent signal from a banner we did not recognize. Test it yourself before changing anything.
How to confirm it yourself
Our check runs from a browser in the EU. Framer’s Cookie Banner has separate settings for EU visitors and for the rest of the world. In the banner component’s code, it decides which to use from the visitor’s browser time zone and language, not from the IP address. A VPN does not change it; to see the EU version, set your computer’s time zone to a European city before you test.
- Open your published site (Framer does not run custom code in the canvas preview) in a private (incognito) window.
- Open developer tools (F12), go to the Network tab and filter by
analytics.tiktok.com/api. - Click Accept on the cookie banner and wait about 5 seconds. You should see a request to
analytics.tiktok.com/api/v2/pixelwhose payload has"event": "Pageview". If nothing appears, the pixel does not fire after consent. - Click to another page. If events only appear now, the pixel starts one page too late and you lose the first page of every visit, usually your ad’s landing page.
- Look at the Console tab. An error such as
ttq.holdConsent is not a functionpoints to the consent commands (step 6 below); a Content Security Policy error points to step 7.
The TikTok Pixel Helper extension, Test Events in TikTok Events Manager and TikTok’s pixel_debug cookie work as described in the general guide.
How to fix
On a typical Framer setup, the chain is: Framer’s Cookie Banner component, then Google Consent Mode in Google Tag Manager (GTM), then the TikTok tags in GTM. Check each link.
-
Check the Cookie Banner component.
- Its GTM ID property must contain the same container that holds your TikTok tags. If you installed the pixel from TikTok Events Manager (Partner Platform > Google Tag Manager), that is the container you picked there.
- The component must be on every page, usually inside the navigation or footer. If it only exists on the home page, visitors who land elsewhere never send a consent update.
- Under Regions, check that Marketing is part of what the visitor accepts. In the banner component’s code, Marketing maps to
ad_storage,ad_user_dataandad_personalization. - Reload after clicking Accept: the banner should not come back.
-
Check that GTM loads. In the Network tab, filter by
googletagmanager.com. You should seegtm.js?id=GTM-...with your container ID. In our tests, the banner loaded GTM itself when GTM ID was filled in, so you do not need a GTM snippet in Site Settings > Code. If there is nogtm.jsrequest, the GTM ID is empty or wrong, or the banner is not on this page. -
Use GTM Preview mode. Click Preview in GTM and connect to your published Framer URL (Framer suggests the Tag Assistant Companion extension if Preview does not connect). Click Accept on the banner and check:
- that a consent update appears with
ad_storageset togranted, followed by an event namedcookie_consent_update(the event the banner sent in our tests); - whether each TikTok tag fired. Blocked by consent means the update did not arrive or does not grant what the tag requires. Not fired means its trigger never ran.
- that a consent update appears with
-
Fix the triggers. This is how the banner talks to GTM, from our tests and the banner component’s code:
- First visit: the banner sets the default consent (usually denied), then loads GTM. When the visitor clicks Accept, it sends a consent update and pushes the data layer event
cookie_consent_update. - Later visits: the stored choice is applied as the default before GTM loads, and no
cookie_consent_updateevent is sent.
A TikTok tag with only a page view or “All Pages” trigger is blocked on the first visit and never runs again on that page. Give the TikTok base code tag (named
TT-<pixel code>-Web-Tag-Pixel_Setupif TikTok’s setup created it) and your page-load event tags two triggers: a Custom Event trigger forcookie_consent_updateand the page view trigger they already have. Set the base code tag to fire Once per page. The event tags only call the pixel, they do not load it, so the base code tag must run on the consent trigger too. Framer switches pages without a full reload; once the pixel has started, it measures a page view on each address change by itself. - First visit: the banner sets the default consent (usually denied), then loads GTM. When the visitor clicks Accept, it sends a consent update and pushes the data layer event
-
Check the tags’ consent settings. In Advanced Settings > Consent Settings, each TikTok tag should require
ad_storage(plusad_user_dataorad_personalizationif you use them). A tag that requires a consent type the banner never grants never fires. -
If you use TikTok’s consent commands (
ttq.holdConsent()in base code pasted into custom code):- add
"holdConsent","revokeConsent"and"grantConsent"to thettq.methodslist in the base code. Without them,ttq.holdConsent()throws an error and the pixel never starts; - something must call
ttq.grantConsent()after Accept, and again on every page load for returning visitors. Framer documents no browser event for the banner’s choice outside GTM, so use a GTM Custom HTML tag that requiresad_storage, with the same two triggers as in step 4.
- add
-
Check for a Content Security Policy. Framer lets you add one as a header (Site Settings > Hosting > Headers, on plans with Advanced Hosting) or as a meta tag in custom code. If your site has one, it must allow TikTok’s domains
analytics.tiktok.com,analytics-ipv6.tiktokw.usandads.tiktok.com. -
Check where the base code runs. If the pixel is in custom code rather than GTM, open its entry in Site Settings > Code: under Pages, a selection other than All leaves the other pages silent. Code in one page’s own Custom Code section only runs on that page.
-
If a plugin installs the pixel. PixelFlow (a third-party plugin) says it holds its TikTok Pixel until marketing consent, and its Framer guide loads PixelFlow through GTM behind Framer’s banner. It warns that without a GTM trigger for consent, PixelFlow only loads after the visitor consents and reloads the page.
-
Check the pixel ID. If events leave but never show up in Events Manager, compare
context.pixel.codein the payload with your pixel. -
Publish both the GTM container and the Framer site.
Common causes
- The Cookie Banner points to a different GTM container from the one TikTok’s setup wrote its tags into.
- The TikTok tags have a page view trigger only, with no trigger for
cookie_consent_update. - The event tags were given a consent trigger, but the base code tag was not.
- The Cookie Banner component is not on every page.
ttq.holdConsent()was added to pasted base code without adding the consent methods tottq.methods, or nothing callsttq.grantConsent().- GTM changes were saved but not published, or the Framer site was not republished.
How to verify the fix
- In a fresh private window on the published site: no TikTok events before Accept, and a page view request within a few seconds after Accept, on the same page.
- Reload the page: the page view leaves once on load, without clicking anything.
- In TikTok Events Manager, Test Events shows the page view (the Overview tab is not real time).
- Re-run the check on IsPixelWorking. The issue should be gone, and “TikTok Pixel fires before cookie consent” should not appear in its place.
Sources
- Framer Updates, An All-New Cookie Banner Component (consent through GTM and Google Consent Mode, separate EU and world settings): https://www.framer.com/updates/cookie-banner-component
- Framer Academy, Add a Cookie Banner to your site in Framer (shared component on every page, GTM container ID, verify on the published site): https://www.framer.com/academy/lessons/cookie-banner-component
- Framer Help, Add Google Tag Manager to your site (Site Settings > Code, Pages, Preview mode, Tag Assistant Companion): https://www.framer.com/help/articles/how-to-add-google-tag-manager-to-your-site/
- Framer Academy, Add Custom Code to your site in Framer (page-level custom code, not loaded in the canvas preview): https://www.framer.com/academy/lessons/custom-code
- Framer Help, How to add a content security policy (Site Settings > Hosting > Headers, meta tag in custom code): https://www.framer.com/help/articles/how-to-add-a-content-security-policy/
- TikTok API for Business, Pixel Cookie consent mode (
ttq.methods,holdConsent,grantConsent, every page): https://business-api.tiktok.com/portal/docs?id=1795929012554754 - TikTok API for Business, Install Pixel using code (base code,
pixel_debugcookie): https://business-api.tiktok.com/portal/docs?id=1739585702922241 - TikTok API for Business, Work with Single Page Applications (page view on URL changes, base code tag name): https://business-api.tiktok.com/portal/docs?id=1801524003169281
- TikTok API for Business, Work with CSP (domains to allow): https://business-api.tiktok.com/portal/docs?id=1739585704427522
- TikTok Business Help Center, Get started with Google Tag Manager (Partner Platform setup): https://ads.tiktok.com/resources/help/article/get-started-google-tag-manager?lang=en
- TikTok Business Help Center, Events Manager: monitor and diagnose (Overview not real time, Test Events): https://ads.tiktok.com/resources/help/article/tiktok-events-manager-monitor-and-diagnose?lang=en
- TikTok on GitHub, TikTok Pixel GTM template (calls the pixel, no consent fields): https://github.com/tiktok/gtm-template-pixel
- Google Tag Manager Help, Tag Manager consent mode support: https://support.google.com/tagmanager/answer/10718549
- PixelFlow Docs, Cookie consent in Framer (third-party plugin; GTM trigger after consent, otherwise loads after a reload): https://docs.pixelflow.so/cookie-consent-in-framer-jfeg3
- PixelFlow Docs, GDPR and Tracking Consent (third-party plugin; TikTok Pixel held until marketing consent): https://docs.pixelflow.so/gdpr-and-tracking-consent-xcxgh
- Sourcepeak Studio, Framer Cookie Banner & Google Tag Manager: common implementation mistakes (third-party guide;
cookie_consent_updateevent, GTM loaded by the component): https://sourcepeak.studio/blog/framer-cookie-banner-google-tag-manager-common-implementation-mistakes-to-avoid - IsPixelWorking live test, 2026-10-01: on a published Framer site with the Cookie Banner and a GTM ID, the data layer showed
consent defaultbefore Accept andconsent updatefollowed bycookie_consent_updateafter Accept;gtm.jswas requested by Framer’s site script. Internal links changed pages with the History API, without a new page load.