1
How to insert <script> into <head> on all pages?
Source: outline/outline#9466 · opened by @Romandbr
Hi Outline team,
I need to add a custom tracking script to the <head> of every page:
html
Copy
Edit
<script src="xxx" data-s="OUTLINE"></script>
I tried:
Adding it to static/index.html — doesn’t show up.
Adding via <Helmet> in index.tsx — still not in final HTML.
Injecting in AuthenticatedLayout.tsx and Header.tsx — no effect.
How can I properly inject a <script> into the <head> so it appears on all pages (SSR or CSR)? Any advice would be appreciated!
Thanks!
I need to add a custom tracking script to the <head> of every page:
html
Copy
Edit
<script src="xxx" data-s="OUTLINE"></script>
I tried:
Adding it to static/index.html — doesn’t show up.
Adding via <Helmet> in index.tsx — still not in final HTML.
Injecting in AuthenticatedLayout.tsx and Header.tsx — no effect.
How can I properly inject a <script> into the <head> so it appears on all pages (SSR or CSR)? Any advice would be appreciated!
Thanks!
No pledges yet. Be the first to back this.
Comments
Similar requests
Capacity to export with header and footer
1 vote · 0 comments
Links to headings look different from links to document
1 vote · 0 comments
Improvements to internal page linking
10 votes · 0 comments
Support for Header images
3 votes · 0 comments
Preserve heading bold formatting when link is added
1 vote · 0 comments
No comments yet.