You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bernhardberger
changed the title
How do I add data-* attributes to the generated <script> tag?
How can I add data-* attributes to the generated <script> tag?
Sep 16, 2024
📚 What are you trying to do?
I need to implement OneTrustSDK and that thing needs a
data-domain-script
attribute on the<script>
-Tag. How can I get this data-attribute to render?🔍 What have you tried?
I tried adding it in sciprts.global key:
I also tried adding it in my composable:
The only thing I can see being rendered is a preload link which fails because it needs a
<script>
-Tag with adata-domain-script
attribute:I can see some data-cf-beacon attribute being set here, so I assumed it should be possible: https://github.com/nuxt/scripts/blob/main/src/runtime/registry/cloudflare-web-analytics.ts#L44
No response
The text was updated successfully, but these errors were encountered: