# How to add a script at the beginning of page header?

**URL:** https://meta.discourse.org/t/how-to-add-a-script-at-the-beginning-of-page-header/211513
**Category:** Support
**Created:** [December 8, 2021, 4:41pm UTC](https://meta.discourse.org/t/how-to-add-a-script-at-the-beginning-of-page-header/211513 "2021-12-08T16:41:20Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![cocococosti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cocococosti/32/231474_2.png) [@cocococosti](https://meta.discourse.org/u/cocococosti)
#### Post date: [December 13, 2021, 4:19pm UTC](https://meta.discourse.org/t/how-to-add-a-script-at-the-beginning-of-page-header/211513/4 "2021-12-13T16:19:52Z")

</div>

> [@SchweizerSchoggi](#):
>
> I have tried inserting it to the section  
> Customize =\> Theme =\> Edit CSS/HTML =\> Body

You have to do it in the Head: Customize =\> Theme =\> Edit CSS/HTML =\> **Head**

Or create a theme component with the script (the process to add it to the head is the same) and add it to your theme: [Beginner's guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966)

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-a-script-at-the-beginning-of-page-header/211513)._
