Skip to main content

Install Trfyx on Ghost CMS

Ghost provides a built-in Code Injection feature that makes adding the Trfyx tracker straightforward.

Add the tracker with Code Injection

1

Open Ghost settings

Log in to your Ghost admin dashboard and open Settings → Code Injection.
2

Add the tracker to Site Header

Paste this snippet into the Site Header section:
Replace YOUR_TRFYX_PROJECT_ID with your Trfyx Website ID and yourdomain.com with the domain you want to track. Keep the script URL as https://app.trfyx.com/script.js.
3

Save the changes

Save the Code Injection settings and open your published site.

Alternative: custom theme

If you maintain a custom Ghost theme, you can add the Trfyx snippet directly to the theme’s default.hbs file before the closing </head> tag.

Verify installation

Visit the published site and check Trfyx for incoming activity. Ghost code changes are reflected on the published site, so verify against the live site rather than relying only on the editor preview. If data is missing, check the browser console, CSP rules, hostname configuration, consent settings, and whether the tracker has been installed more than once.
Last modified on October 11, 2026