This document explains how to add the Google Analytics tag to your site.
Even if you place Google Analytics tracking code in an external script file, Google Analytics will continue to ...
Paste the google Analytics code in a file, for example "googleanalytics.js" and include it in the pages you want: