[fix bug 869141] Move google analytics code to another file.

Inline script execution is blocked from CSP rules. Moved the code to
another file which fixes the problem and results in cleaner HTML.