Code injection

Ghost provides a built-in Code Injection feature that allows you to easily add custom scripts, styles, or meta tags without modifying your theme files directly.

To use Code Injection:

  1. Log into your Ghost Admin Dashboard.

  2. Once logged in, go to Settings > Code injection tab.

  3. Click on Open.

For individual post/page injections you can open a specific post/page in your Ghost Admin Dashboard, then from the Post settings > Code injection.

There you have two main sections:

  • Site header: Everything in the site header will be injected before the closing head tag.

  • Site footer: Everything in the site footer will be injected before the closing body tag.

Common use cases

  • Google Analytics or any tracking scripts.

  • Custom Fonts (e.g. Google Fonts or uploaded fonts).

  • Meta tags (for SEO or social media).

  • Live Chat widgets.

  • Custom CSS or JavaScript integration.

Last updated