How to add third party <body> scripts to Nuxt? #8939
Unanswered
mhabbasi-gh
asked this question in
Questions (Nuxt 2)
Replies: 1 comment
-
You can make use of https://nuxtjs.org/docs/2.x/directory-structure/plugins OR If you absolutely want, you can edit default html render template and add your script there https://medium.com/dev-genius/customizing-the-nuxts-default-html-template-b2c6e768f2f7 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I want to add third party script like this to my Nuxt code:
<script> thirdParty.method({ key: myKey, div: document.getElementById('thirdParty'), src: source.com, }); </script>I can just throw it into my component's template body (This script has to be inside <body> not <head>) and interestingly enough it works but there are two issues here:
So I was wondering if anybody knows how can I integrate such scripts into my Nuxt project properly?
Beta Was this translation helpful? Give feedback.
All reactions