0👍
If you use Vue CLI 3, you should have a src
folder and a public
folder. The public
folder contains the index.html
that is used to generate the index.html-file you see in the dist folder after building. Just add your tracker to that and it should be included in your built version as well.
You can also copy the tracker script to the mounted
hook of App.vue, or whatever you use as your main component. Since your application will do nothing useful anyway when javascript is disabled, there is little reason to track that as well.
- [Vuejs]-I want to add vue js components during runtime to my webapp. How do I do this the best?
- [Vuejs]-Problems with reading real time firebase databases with printing in a table
Source:stackexchange.com