There is no clean solution to add Piwik tracker to Synology’s Photo Station 6.
But there is a way to add Piwik tracker, simply add the tracking code after </head> in
/volume1/@appstore/PhotoStation/photo/index.php
After each update of Photo Station, the above procedure should be repeated.