# Custom javascript in \<head\> disappear

**URL:** https://meta.discourse.org/t/custom-javascript-in-head-disappear/144356
**Category:** Development
**Created:** [March 15, 2020, 4:18am UTC](https://meta.discourse.org/t/custom-javascript-in-head-disappear/144356 "2020-03-15T04:18:15Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [March 15, 2020, 5:04am UTC](https://meta.discourse.org/t/custom-javascript-in-head-disappear/144356/3 "2020-03-15T05:04:47Z")

</div>

It does not “disappear” it’s still there. What happens is that we pull all inline scripts and put them in one file for your theme.

[discourse/app/models/theme\_field.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/app/models/theme_field.rb#L73-L128)

So, if you search the page-source for `theme-javascript` you should see something like this

![theme javascript file](https://global.discourse-cdn.com/meta/optimized/3X/d/7/d788dba8a0c0e0b9a4cb4eb89fe3028cfe03a685_2_689x31.png)

This file will contain all of your inline scripts.

Also, Discourse has native support for Google Analytics, so why not use that?  
Search the settings for `Analytics`

---

_[View the full topic](https://meta.discourse.org/t/custom-javascript-in-head-disappear/144356)._
