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.
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
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