According to the vue-meta documentation it should be possible to add javascript to a script tag with innerHTML. But when I try this in the index.js of a plugin, the resulted js code is always encoded:
let config_js = '_paq.push(["setTrackerUrl", "' + (options.trackerUrl || options.piwikUrl+'piwik.php') + '"]);'
config_js += '_paq.push(["setSiteId", "' + options.siteId + '"])'
this.options.head.script.push({
innerHTML: config_js, type: 'text/javascript'
})
results in:
<script data-n-head="true" type="text/javascript">_paq.push(["setTrackerUrl", "//piwik.example.com/piwik.php"]);_paq.push(["setSiteId", "1"])</script>
See #1330 for a use case
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1212">#c1212</a>)</em></sub></div>