1
Copy your CookieChimp snippet
Log in to your CookieChimp dashboard and copy your website's JS snippet:Replace
abc123 with your website's unique CookieChimp ID.2
Add the snippet via Ghost Code Injection
- Sign in to your Ghost admin (e.g.
your-site.com/ghost). - Open Settings → Code Injection from the left sidebar.
- Paste the CookieChimp snippet into the Site Header field. This injects it into the
<head>of every page Ghost renders. - 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.
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 Add the preferences button to your footer by editing your theme’s
data-cc="show-preferencesModal":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 withtype="text/plain"anddata-categoryto 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.