Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cookiechimp.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Add a GDPR, ePrivacy and CCPA compliant cookie consent banner to your Ghost blog or publication. CookieChimp installs through Ghost’s built-in Code Injection — no theme edits, works on Ghost(Pro) and self-hosted Ghost alike.
1

Copy your CookieChimp snippet

Log in to your CookieChimp dashboard and copy your website's JS snippet:
<script src="https://cookiechimp.com/widget/abc123.js"></script>
Replace abc123 with your website's unique CookieChimp ID.
2

Add the snippet via Ghost Code Injection

  1. Sign in to your Ghost admin (e.g. your-site.com/ghost).
  2. Open Settings → Code Injection from the left sidebar.
  3. Paste the CookieChimp snippet into the Site Header field. This injects it into the <head> of every page Ghost renders.
  4. Click Save.
The CookieChimp script needs to be the first script in the <head> section so it can block other scripts before they run and set cookies without consent. If other scripts are added before, they may set cookies and other storage items before consent is granted.
3

Block scripts & cookies

To stay compliant with GDPR and other privacy regulations, you need to actively block non-essential scripts and cookies until the user gives consent. See our Scripts Management Section for full details.
Common Ghost integrations — Google Analytics, Plausible, Fathom, Mailchimp, Disqus, Hotjar — are usually added in the same Code Injection panel. Update those <script> tags to use type="text/plain" and a matching data-category so CookieChimp can release them after consent.
4

Disable Ghost's built-in privacy features that conflict

Ghost’s native member features and built-in newsletter signup set first-party cookies. These are typically classified as essential / functional (the user is actively signing up), so they don’t need to be blocked. However, if your theme bundles analytics out of the box, disable them in Settings → Code Injection or your theme settings and re-add them through CookieChimp so consent is enforced.
5

Allow users to update their preferences

CookieChimp provides a floating privacy icon (Privacy Trigger) that lets users manage cookie preferences at any time. Enable it in the banner settings.To open the preferences modal from a custom button or link, add the data attribute data-cc="show-preferencesModal":
<button type="button" data-cc="show-preferencesModal">
  Manage cookie preferences
</button>
Add the preferences button to your footer by editing your theme’s default.hbs (self-hosted) or by adding the HTML directly in the Site Footer field of Code Injection.

Troubleshooting

  • Banner doesn’t appear — make sure your Ghost domain is allowed in Account Settings → Additional Domains in your CookieChimp dashboard.
  • Banner only shows on the homepage — re-check that the snippet is in Site Header (not just on a single page’s code injection). Site Header applies globally.
  • Banner shows but scripts still fire — Ghost themes sometimes inline analytics directly in default.hbs. Inline scripts must also be tagged with type="text/plain" and data-category to be blocked.
  • Enable Debug mode from the CookieChimp dashboard and check the browser JS console for errors.
If you encounter any issues or need further assistance, please reach out to us via our chat.
Yes. Code Injection works identically on Ghost(Pro) and self-hosted Ghost. No server access or theme changes are required.
The banner appears on the standard web rendering of your Ghost posts. AMP pages and emailed newsletters do not run JavaScript, so the banner is not needed there — Ghost handles consent for newsletter subscriptions separately at sign-up time.
No. The CookieChimp script is under 30KB gzipped, loads asynchronously and is served from a global CDN. It doesn't block rendering and won't meaningfully affect your Lighthouse scores.
CookieChimp has a free tier suitable for low-traffic sites, with paid plans for higher traffic and additional features. See pricing.