Page tracking register only on refresh


I’m using matomo clound on a vueJS project.
I have imported the script to use in the of all pages :

var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
(function() {
var u="<<MYURL>>";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='//<<MYURL>>/matomo.js'; s.parentNode.insertBefore(g,s);

I can see the visits when I’m accessing my site, but when I navigate and the url changes, it doesn’t track the news pages on the matomo dashboard. For the new pages to appear on the dashboard I have to manually refresh the page.
Example :
I’m on and from here i go to mysitecom/account

What I see on the dashboard is just the visite to
And if I want to see the visit to mysitecom/account I have to refresh mysitecom/account
Am I missing something here ?


1 Like

I’m facing the same problem. Mine happens when I log out and login as a different user on my website. The userId updates correctly but the old url still remains until I manually refresh the page.