Wordpress site with non-Wordpress static pages

Hello,
I am new to Matomo and would be grateful for some setup advice for my situation where I have a small regular Wordpress site along with static pages that are not managed by WP (in a public folder at the same level as wp-content) but for which I would also like to get analytics.
Can Matomo Analytics for Wordpress be configured to report stats on non-WP pages? Otherwise, would Matomo On-Premise + the WP-Matomo plugin work?
I am comfortable with writing some JS/PHP if necessary, but if this is necessary some general directions on how to proceed would be appreciated.
Thanks in advance for any help.

If you know the siteID, you should be able to track in the same place (siteID).
Just follow:
https://developer.matomo.org/guides/tracking-javascript-guide
OR
https://developer.matomo.org/guides/tagmanager/introduction

Thanks Philippe for the pointers, I’ll start with that.
My remaining worry is whether Matomo Analytics for Wordpress will actually “see” those non-WP pages even with the proper tracking code, but I guess I can always move to On-Premise if it does not.
Cheers.