Answer the question
In order to leave comments, you need to log in
Where to insert the Yandex metrics code?
Tell me where can I insert the Yandex metrics code so that it is global on all pages in Vue + Nuxt?
Tried in mounted in dev it works but in the consoles there are errors and it is no longer going to the prod.
Doesn't work in app.html JS is not executed
Extensions I don't need just a place where I can stick the code that Yandex metric gives?
Answer the question
In order to leave comments, you need to log in
If you are talking about HTML code, then insert the template into vue, in the . Or create a component and insert only the component itself, so that there is less code.
If you are talking about meta tags, then like Nuxt.config.js allows you to enter, so write there. Yes, and without SSR it will hardly work normally.
If you are talking about JS code, then you already need to read the documentation in more detail. Since many do not know what code is inserted there at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question