Skip to main content

Ghost Integration

Add Ovyxa analytics to your Ghost publication using the built-in Code Injection feature.

Step 1: Open Code Injection

  1. In your Ghost admin panel, go to Settings > Code Injection

Step 2: Add the Tracking Script

In the Site Header section, paste the following:

<script
defer
data-domain="yourdomain.com"
src="https://ovyxa.com/js/script.js"
></script>

Click Save.

That's it -- Ovyxa will now track pageviews across your entire Ghost site, including all posts and pages.

Tracking Custom Events

To track interactions like newsletter signups, add code to the Site Footer section:

<script>
// Track newsletter subscription form submissions
document.addEventListener('submit', function(e) {
if (e.target.closest('.gh-subscribe-form, [data-members-form]')) {
window.ovyxa('event', 'NewsletterSignup', {
props: { location: 'site' }
})
}
})
</script>

Or trigger any custom event:

window.ovyxa('event', 'MemberSignup', { props: { tier: 'free' } })

Cookieless Mode

To skip cookie consent requirements, add the data-cookieless attribute:

<script
defer
data-domain="yourdomain.com"
data-cookieless
src="https://ovyxa.com/js/script.js"
></script>

Verify Installation

  1. Save your Code Injection changes
  2. Visit your live Ghost site (not the admin panel)
  3. Open the browser Network tab and look for a request to ovyxa.com/js/script.js
  4. Check your Ovyxa dashboard to confirm pageviews are appearing

Note: Code Injection is available on all Ghost plans, including self-hosted Ghost installations.

Next Steps