As for loading the ppms.js file (the Piwik PRO JavaScript Tracking Client) from a first party domain, you have to first enable the Disable injection of the tracking client.
(explanation, you can skip this part)
Now, the issue with client-side GTM templates is that you can’t pull external scripts from any domain you want. You basically have to define the domain(s) in the template configuration which makes it hard to be compatible with each user setup (we’d have to whitelist thousands of domains that our users use). (end of explanation)
What you basically have to do, is create a custom HTML tag and inject the script yourself. It’s best to use the same trigger that you have used for the Basic tracking code tag (Page view from what I can see) and also make sure that it’s prioritized/added before it.
Below you can find an example of how the custom HTML could look like. Just make sure to replace yoursgtmendpoint.domain.com.
We’ll update the documentation as this should’ve been described there.