maybe you can add google analytics code to js file. example googleanalytic.js
then add this code
after <head>
Code: 
<script type="text/javascript" src="{THEME}/js/googleanalytic.js"></script>