Matomo + Ghost

How to use Ghost and Matomo together

Take control of your site’s analytics with a Matomo and Ghost integration for powerful web analytics.

If you’re looking for powerful analytics for your site, with 100% data ownership and user privacy protection, Matomo is a great option - and it can be integrated with your Ghost site in just a few steps.

Create a Matomo cloud account

To use Matomo’s hosted offering, create an account and enter your domain to get started:

It’s also possible to host Matomo on your own servers to keep your data entirely in your hands.

Get the tracking code

In order to start tracking your website, grab the JavaScript Tracking code which will be accessible when you first sign in to your account, or from the admin area of your account:

Use Ghost code injection

In Ghost you can inject code across your entire site or on an individual post or page. Since Matomo needs to track analytics across your entire site, we’ll use the global code injection feature which can be found in the Ghost Admin settings menu.

Matomo requires the tracking code to be before the closing </head> tag of each page on your site, so paste it into the Site Header section and hit save.

Your site is now fully integrated with Matomo. Enjoy privacy-focused data for your Ghost publication by logging in to check your dashboard. For more advanced configurations to track goals, custom variables, ecommerce orders, abandoned carts and more, use the official Matomo Javascript Tracking documentation.