var currentUrl = location.href
var titlePage = document.title
var pathUrl = window.location.hash.substr(1)
this.$piwik.setCustomUrl(pathUrl)
this.$piwik.setDocumentTitle(titlePage)
this.$piwik.deleteCustomVariables(1, 'page')
this.$piwik.setGenerationTimeMs(5)
this.$piwik.trackPageView()
this.$piwik.enableLinkTracking()
the problem is that the page is recorded twice, when I go to the localhost / x page, the previous page will remain in the record, when going to the localhost / y page, the previous page will also remain in the record
is there a solution for this?
This is probably something you should rather ask the developer of VueMatomo (or invite him to answer here), but I wouldn’t be surprised if by default the module tracks a pageview on every route change and therefore your this.$piwik.trackPageView() records it a second time.
But as said this is just a guess as I haven’t used VueMatomo.
Thanks all, it has been solved, but there are other problems
when the user is on the “localhost/about” page, and the user reloads the page, not the “localhost/about” page that is recorded but page “localhost:8080”
is this default in vue js or not, which is clearly not what I want
I would guess, this happens because trackInitialView is enabled. But as this is surely not a Matomo problem, you should maybe ask the developer about this.