Page contains scripts only once
Some scripts duplicate whenever some actions are made in the site.
For example changing between Near you and Favorites tabs in the front page. Probably some init script is being run in the wrong place.
One duplicating script is at the beginning of the head html tag. Another is at the end of the body tag.
The scripts are related to Google Tag Manager and Matomo
Navigate to reittiopas.hsl.fi
Open dev tools (F12)
Open elements viewer
Change to Favorites tab
There will be additional script tags at the end of html body and beginning of head
Do more actions on the site to get more duplicates
Does not work in local dev environment.
I was able to reproduce in reittiopas.hsl.fi
Tested on chrome and firefox
Some initialization scripts for analytics gathering are duplicated whenever actions are made on the page.