Pageviews recorded twice with matomo

I have this weird issues that Matomo (using tag manager) is recoring every pageview twice. Only thing I altered: I am using setUserid do get my Grav users in Matomo, which works beautifully.

Is my code not correct maybe?

<script type="text/javascript">
var _mtm = _mtm || [];
_mtm.push({'setUserId': '{{ grav.user.username }}', 'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=''; s.parentNode.insertBefore(g,s);

MTM is up to date.

Hope someone knows why this happens