Adding Matomo tracking to my WriteAs blog

You know, I like to take a look at statistics of the content I create. WriteAs has built-in functionality for this, but it is quite limited. The reports it gives you contain only data about views, without giving more information. And also, their charts are broken: my previous post has 21 views, but the chart shows only one.

I can solve this by adding my own tracking to my blog, using the same analytics software as WriteAs itself: Matomo (previously named Piwik). I have it installed on my dedicated server and need it anyway for my client's sites. I can add it to my site by selecting my preferred blog URL to be n1ne.writeas.com, and then going to the blog customization page to edit the JavaScript code that is injected in every page. Custom JavaScript is a pro feature.

Here's what it looks like on the customize page: