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.
<%=ConfigurationManager.AppSettings["GAAccountId"]%>
aspx
You can do decalre a variable in aspx page
Use GAAccountId variable in JS File
GAAccountId