Skip to content
fusionaly_ GitHub

Ghost Analytics Without Cookies

Add Fusionaly to a Ghost blog with code injection. No theme edit, no cookies. Track sign-ups and clicks on your posts.

In Ghost, you add the Fusionaly script with code injection. You do not edit your theme, so the script stays when you change or update the theme.

Before you start

You need a Fusionaly server, with your site's domain added as a website. Fusionaly takes events only from the domains you added. See Installation.

In the examples, replace analytics.example.com with the domain of your Fusionaly server.

Add the script

  1. In Ghost Admin, open Settings, then Code injection.

  2. Paste the script in Site header, and save:

    Site header
    <script defer src="https://analytics.example.com/y/api/v1/sdk.js"></script>

Page changes

Ghost themes load each page in full, so Fusionaly counts each post and page without any setup.

Track events

Fusionaly counts page views and button clicks without any setup. To give an event your own name, use the data-fusionaly-event-name attribute. See Tracking.

To track a link in a post, add an HTML card in the editor:

<a href="https://example.com/course"
data-fusionaly-event-name="course_clicked"
data-fusionaly-metadata-post="pricing-guide">Get the course</a>

Check that it works

  1. Open your site in a normal browser window. Fusionaly skips automated browsers, such as Playwright, and browsers that send Do Not Track.
  2. In the developer tools, open the network tab, and find a POST request to /x/api/v1/events. A 403 status means that your site's domain is not added as a website.
  3. Open your Fusionaly dashboard. The visit shows up within about a minute.

Notes

  • Fusionaly counts visits to your site, not newsletter opens. Email apps do not run scripts.
  • To track one post only, use the Code injection settings of that post instead of the site settings.

Next steps

Guides for other frameworks: Next.js, React, Astro, Nuxt, SvelteKit, WordPress, Shopify, Webflow, Hugo, and the generic guide.