AmazingDreams / vue-matomo

Vue plugin for Matomo Analytics
MIT License
274 stars 61 forks source link

Do not track hash updates #64

Closed anbraten closed 4 years ago

anbraten commented 4 years ago

I am often updating my url with this.router.replace({ hash: '2020-05-28' });. Hash updates are registered by router.afterEach, but to.fullPath only contains the url without the hash part, so I get 1000s of updates with the same url.

AmazingDreams commented 4 years ago

I was thinking about this but I think this will break other use cases.

Could it work for you if the hash part was included with the url? https://matomo.org/faq/how-to/faq_188/

AmazingDreams commented 4 years ago

I cannot reproduce your issue. For me both the fullPath properties contain the url including hash. I have started work on a pre-tracking hook which would allow you to write custom logic to cancel the tracking. https://github.com/AmazingDreams/vue-matomo/tree/feature/before-track-page-view

AmazingDreams commented 4 years ago

I am closing this due to inactivity. Please retry using the latest version and let me know if your issue persists.