Matomo Analytics in Knowledge Base

Matomo Analytics in Knowledge Base

We use self hosted Matomo Analytics for privacy friendly tracking of user behavior on our websites. Is it possible to place a tracking script in the Knowledge Base website?
I can only find settings for Google Analytics and PageSense.

I've manually pasted the script in the footer content but it gets stripped on save.
Tracking with an image seems to work, but the info returned is limited.