Add the TermsFeed Privacy Consent cookie banner to Ghost by pasting its snippet into the Site header field of Code injection. Ghost prints that field inside the <head> of every page, so no theme edit is involved. Setup takes about 10 minutes on Ghost 5 or Ghost 6.

Ghost has no tile on the install screen of the TermsFeed app, and the snippet goes in the head as on a site you code by hand. You need an Administrator or Owner role in Ghost Admin and a list of the tracking tags you added to Code injection or your theme. Create the consent banner and copy its snippet with Create Your First TermsFeed Privacy Consent Banner.

The Install page of your consent banner gives the snippet, with your own token in place of YOUR_TOKEN. Copy it from there, then paste it into Ghost Admin.

<!-- 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) -->
  1. Open Settings in Ghost Admin.
  2. Open Code injection in the Advanced section.
  3. Paste the snippet into the Site header field.
  4. Save the change.

Ghost prints the Site footer field before the closing body tag, and the code injection of a single post reaches that post only. Neither gives you a consent banner on every page in time.

Ghost analytics runs outside Privacy Consent, because Ghost itself adds it and no vendor holds it back. Ghost records member signups, newsletter opens, and link clicks on its own servers. The traffic reports in Ghost Admin come from what Ghost calls cookie-free web analytics, on by default on Ghost(Pro), according to the Ghost page on its Tinybird integration.

Decide whether to keep the traffic reports, and turn them off under Settings > Analytics in Ghost Admin where you do not want them. Describe what stays on in your Privacy Policy and Cookies Policy. Read the other things a browser consent tool does not reach in the blocking limits of Privacy Consent.

A Google Analytics or Meta Pixel tag in the Site header field, the Site footer field, or the theme runs on every page before the visitor answers. Move each one into a vendor so it waits for consent.

  1. Note the IDs in the tag, in the Code injection field or the theme template.
  2. Add the tool in Vendors in the TermsFeed app, from its template where one exists.
  3. Delete the tag from Ghost, leaving only the Privacy Consent snippet in the Site header field.
  4. Reload a page and search the page source for the tool host, such as googletagmanager.com, to confirm the old tag is gone.

A tool with no template goes in a custom vendor. Set up each tool with Add a Vendor From a Template.

Ghost members, the Portal signup window, and newsletter forms stay outside Privacy Consent, because they carry out a request the visitor makes. Ghost uses its member cookies to keep a signed-in member signed in. A vendor that holds Portal back blocks signup and sign-in for every visitor who declines.

A newsletter signup collects consent to receive email, and that differs from consent to cookies. Privacy Consent records the cookie and tracking answer only, so keep your signup wording apart from the consent log.

The embed cards of the Ghost editor insert YouTube, Vimeo, and social iframes as they are, and those load before consent. Write each embed as a replaceable tag inside an HTML card instead, so it shows an embed placeholder until the visitor accepts its vendor.

<termsfeed-privacy-consent-tag-iframe
    data-termsfeed-pc1-vendor-id="termsfeed-1a2b3c4d-5e6f"
    src="https://www.youtube.com/embed/VIDEO_ID"
    width="560" height="315" title="YouTube video"
    allowfullscreen></termsfeed-privacy-consent-tag-iframe>

The vendor needs "Has replaceable tags?" switched on, on its "Replaceable tags" tab. The Important tags button in the vendor list then shows this markup with your vendor ID. The switch is locked on some accounts. The element around the tag sets the size of the embed placeholder, so give the HTML card a wrapper with a width and a height. Set the vendor up with Replaceable Tags.

Switch on "Use a sticky button to open the Privacy Preferences Center?" on the Appearance page in the TermsFeed app. Every Ghost page then shows a floating button that reopens the choices, with no Ghost edit.

A footer link takes a theme edit, because Ghost navigation links take a label and an address only. Add this element to the footer of your theme, then upload the theme. Compare the options in Let Visitors Reopen Preferences.

<a href="#" id="open_privacy_preferences_element">Privacy Preferences</a>

List your own domain under "What is your website domain?" on the Settings page, and any other address that serves the site, such as a .ghost.io address, under "Additional domains". An address you did not list does not show the consent banner.

Each address keeps its own answer in the browser, so a visitor who answered on one sees the consent banner again on the other. Add addresses with Run One TermsFeed Privacy Consent Banner Across Several Domains.

Save Code injection, then test in a private window, signed out of Ghost Admin and of any member account. A new consent banner starts on the Strict consent logic and asks every visitor. Standard in Settings hides it from a visitor in a US state, so pick a test location with Cookie Banner by Visitor Location.

  1. Open the site, open DevTools, select the Network tab, and type termsfeedtag in the filter box.
  2. Reload the page and confirm 7 requests with status 200: plugin.js, plugin-2.js, plugin-r2.js, preferences-r2.js, vendors-r2.js, and settings.json twice.
  3. Open the Console tab and confirm that no line after [termsfeed] holds [ee] or [ww].
  4. Open a post with a replaceable tag, change the Network filter to youtube.com, and confirm no request appears and the embed placeholder shows.
  5. Filter for events.push, click I Agree on the consent banner, and confirm a new request with status 201 and the embed loading in place.

Test I Decline after closing every private window and opening a new one, because private windows share storage while any stays open. Run the rest of the checks with Check That Your TermsFeed Privacy Consent Installation Works.

Most Ghost faults come from the wrong Code injection field or a tag left in place.

  • The snippet sits in post code injection. It loads Privacy Consent on one post, and every other page runs without a consent banner.
  • The snippet sits in the Site footer field. Move it to the Site header field, the head of the page.
  • A tracking tag stays in Code injection. It runs before consent, next to the vendor that runs the same tool after consent.
  • An embed card stays in a post. Its iframe loads before consent, because only a replaceable tag waits for the answer.
  • Portal sits behind a vendor. Visitors who decline then lose signup and sign-in.