Here are instructions: Piwik Analytics with AMP on WordPress
I guess Piwik is yet to have full support but this is certainly good enough for me, because we can track the essentials.
Also looking for a solution to this. AMP doesn’t allow Javascript. Another way to track users is with a single image but this has some big limitations.