A dedicated solution called SharePoint Analytics for Matomo (Piwik) exists. It lets you easily integrate Matomo web analytics with your SharePoint service and learn more about the productivity of your employees and overall user engagement. It also supports connecting SharePoint to the Analytics solution using SSO and ADFS. Learn more.