How to add code from Naver Analytics on the site Nuxt.js?

How to add code to track from Naver Analytics on the site Nuxt.js?

Example of tracking code:
<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script>
<script type="text/javascript">
if(!wcs_add) var wcs_add = {};
wcs_add["wa"] = "123456789";
wcs_do();
</script>

tried here so:
nuxt.config.js:
script: [
 { src: '//wcs.naver.net/wcslog.js' }
 ]

...
{src: '~plugins/naver-analytics.js', ssr: false}
...
plugins/naver-analytics.js
export default ({ app }) => {
 if(!wcs_add) var wcs_add = {};
 wcs_add["wa"] = "123";
wcs_do();
 wcs.event('create', '123', 'auto')
 app.router.afterEach((to, from) => {
 wcs.event('set', 'page', to.fullPath)
 wcs.event('send', 'pageview')
})
}

but of course nothing works
April 3rd 20 at 17:32
0 answer

Find more questions by tags JavaScriptAnalystVue.jsNuxt.js