I had this javascript code in aspx file
Page.aspx
----some code----
<%=ConfigurationManager.AppSettings["GAAccountId"]%>
will work when you are using it in aspx
file. It will not be evaluated when you are using it in external js file.
You can do decalre a variable in aspx page
<script type="text/javascript">
var GAAccountId = '<%=ConfigurationManager.AppSettings["GAAccountId"]%>';
</script>
Use GAAccountId
variable in JS File