0👍
What kind of tracker is this ? If it does not have any way of setting it app-wise, I guess that you need to have a middleware that is running your function and grabbing the dynamic part from each page.
This can be helpful: https://nuxtjs.org/docs/2.x/directory-structure/middleware/
Also, I did found some issues on using a middleware in a layout
, but maybe it’s just me, if it does work on your side, you could just dump your js
there too.
- [Vuejs]-ASP.NET SPA with VueJS: only serving certain routes/files based on authorization
- [Vuejs]-VueJS Performance Questions
Source:stackexchange.com