The TermsFeed Privacy Consent cookie banner becomes the Largest Contentful Paint (LCP) element when it is the largest text block on screen, even though its script does not block rendering. LCP then moves to the moment the consent banner appears, which is later than your own content. Fix this on your page and in the consent banner type, never by delaying the script. The check and the fixes take 5 steps and about 20 minutes.

The async attribute lets the browser download the Privacy Consent script while it keeps parsing and painting your page. The snippet from the TermsFeed app carries the attribute already, so add nothing to it.

<!-- Privacy Consent by TermsFeed (https://www.termsfeed.com) -->
<script type="text/javascript" src="https://cdn.termsfeedtag.com/plugins/pc/v1/YOUR_TOKEN/plugin.js" async></script>
<!-- End Privacy Consent by TermsFeed (https://www.termsfeed.com) -->

The first file waits until the page has parsed, then loads the rest from cdn.termsfeedtag.com without blocking: a second loader, 3 code files, and 2 settings requests. It does not load a font file, whichever font you choose on the Appearance page, and your Custom CSS does not load a file either. The browser keeps these files and the settings for up to 1 hour (3,600 seconds). A visitor who loads a second page within the hour takes them from the cache. Read the full sequence in SDK Load Sequence.

LCP reports the render time of the largest image or text block in the viewport, and the browser updates it whenever a larger element paints, until the visitor first interacts. The consent banner appears only after all of those requests arrive. A consent banner with a text block larger than your heading or hero image therefore becomes the LCP element, and LCP takes its later time.

This happens most often on phones, where the consent banner spans the full width of a small screen. A returning visitor does not see a consent banner, so the effect applies to first visits and to visits where Privacy Consent asks again.

Google tags added from their templates need no code in the head, because Privacy Consent sends the defaults before it inserts the on-load vendor tags that load them. The defaults carry wait_for_update at 500 milliseconds. A returning visitor gets the update with the defaults, so a Google tag reads the answer on its first command.

A custom vendor does not send signals, so Basic Consent Mode runs on your own code. The order in the head is your Consent Mode defaults, then the Privacy Consent snippet, and your Google tags or container go in the custom vendor. Your defaults are inline JavaScript, so they do not add a request. Copy the head block from Set Up Google Consent Mode v2.

Why a self-hosted copy of the script fails or saves nothing

Load the Privacy Consent script from the address the TermsFeed app gives, because a copy on your own server either stops the loader or saves nothing. A copy on your host under the original path, /plugins/pc/v1/YOUR_TOKEN/plugin.js, sends every later request to your host. Those requests fail unless your server forwards every path to cdn.termsfeedtag.com with the Origin header of the page.

A copy under any other path loads the rest from cdn.termsfeedtag.com as before. It saves only the first file, and it stops receiving the changes TermsFeed makes to that file. Check the install rules in Install the Script.

Open your site in a private window, so no saved answer hides the consent banner, and record a first visit in Chrome DevTools. A visit on the opt-out model has no consent banner, so run this check from a location that shows it.

  1. Select the Network tab and type settings.json in the filter box.
  2. Select the Performance tab, turn on CPU throttling and network throttling for a phone, and click the reload button to record.
  3. Click the LCP marker in the Timings track and read the element in the Summary panel. An element inside #termsfeed_pc1_notice_banner means the consent banner is the LCP element.
  4. Return to the Network tab and compare the time the second settings.json request finished with the LCP time. The first request returns only a url field, and an LCP right after the second one confirms the consent banner as the cause.

Step 2: Make your own content the largest element

Give each page template a heading, image, or text block that paints early and is larger than the consent banner. Put the hero image and the main heading in the HTML the server sends, instead of content a script adds later. A large element that paints first keeps the LCP at its own early time, whatever the consent banner does afterward.

Compare the 5 types under "Choose a banner type" on the Appearance page of the TermsFeed app. On a phone, "Card", "Bar", and "Panel" stop at 85% of the viewport height, while "Simple" and "Headline" grow up to the full viewport height, then scroll. "Simple" hides the header, the title, the US opt-out sentences, and the vendor category switches, while "Headline" shows every part. The text is fixed per language, so the type and your CSS set the size. Compare them on a phone in Preview Before Publishing.

A smaller font size or less padding reduces the size further. Keep I Decline as visible as I Agree in any change, with Custom CSS.

Exclude cdn.termsfeedtag.com from every "delay JavaScript" or "load scripts on interaction" feature of your caching or optimization plugin. A delayed script shows the consent banner later, which moves the LCP later when the consent banner is the LCP element. Every vendor waits for it too, so a visitor who has already accepted loads analytics later on every page.

Do not hide the consent banner from test tools to raise a lab score. Google assesses Core Web Vitals in search from field data of real Chrome visitors. Privacy Consent applies the same location rules to crawlers and test servers as to any visitor.

Step 5: Check the LCP element and time after the fixes

Publish your template and Appearance changes, then open a new private window, open Chrome DevTools, select the Network tab, and type cdn.termsfeedtag.com in the filter box. The Privacy Consent requests still appear. Record in the Performance tab with the same throttling as step 1. The LCP marker now points to your heading or hero image, and the LCP time comes before the second settings.json request finishes. Record the new figures beside your baseline in Core Web Vitals.