If you wish to add javascript to every page within JIRA (for example for use with Goolge Analytics), add the following javascript to <atlassian-jira>/includes/decorators/header.jsp (JIRA 4.x) or stylesheettag.jsp (JIRA 3.13):

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-xxxxx";
urchinTracker();
</script>