Custom Javascript in Theme

(Raphael Haase) #1

I would like to add some custom JavaScript to my theme to add some stuff like analytics. The JS should go into a separate file as opposed to including inline JS. Where should I place such files in the Discourse path hierarchy and how do I reference them from the code (i.e. what is the URL structure after my hostname to include the JS file)?

Two communities - same accounts