Yes, you can use any combination of analytics packages at the same time on your pages. The downside is that your pages might take longer to load as each analytics Javascript tracking code will add some delay to the page load. We also recommend putting the Matomo (Piwik) Tracking code immediately before the closing </head> tag.

Read more about the Matomo Javascript Tracking API