Fix JS error on new-dashboard

New dashboard JS code fails upon page load, due to a missing JS var dependency in the global namespace. Was not encountered before since affected code was not loading in either development or staging.

Solved by loading inlined JS vars before the script files. Staging should be configured as production for TrackJS, so we can catch this kind of errors earlier on.