Matomo, Wordpress plug-in

my Wordpress Page doesn’t support php version up to 5.6 and i cannot install the matomo analytics plug-in. Is there other way to connect matomo with wordpress? I tried to put Javascript code in pages but it doesn’t work again.

Increase php version via htaccess? I would advise against php5