Add DataFast to your Ghost CMS site

Follow these steps to integrate DataFast analytics into your Ghost CMS site.

Add tracking script using Code Injection

Ghost provides a built-in Code Injection feature that makes it easy to add scripts to your site.

  1. Log in to your Ghost admin dashboard

  2. Go to Settings > Code Injection

  3. In the Site Header section, paste your DataFast tracking script:

    <script
      defer
      data-website-id="YOUR_WEBSITE_ID"
      data-domain="YOUR_DOMAIN.COM"
      src="https://datafa.st/js/script.js"
    ></script>
    

    Replace YOUR_WEBSITE_ID with your actual Website ID from DataFast. Replace YOUR_DOMAIN.COM with your website's root domain.

  4. Click Save

Alternative: Using a custom theme

If you're using a custom theme, you can add the script directly to your theme's default.hbs file:

  1. Go to Design > Theme Editor
  2. Open default.hbs
  3. Add the script just before the closing </head> tag
  4. Save your changes

Verify installation

After implementing either method:

  • Visit your live website
  • Check your DataFast dashboard for incoming data
  • It might take a few minutes for the first pageviews to appear
Custom code changes in Ghost appear on the published site, not in the preview.
Something missing? Suggest features ✍️