Google analytics plugins is not working and I found a simple way.it works pretty well.
Please find lib/pkp/templates/frontend/components/header.tpl and paste your script
Add your google script to the {literal} ranges
{literal}
…
…
…
{/literal}
If you do the same for yandex metrics, it works.