Where to insert the Google Analytics script?
Put your Google Analytics script directly before the </head> in your page.
Amazingly Google only says: ‘To get all the benefits of Universal Analytics for this property, copy and paste this code into every web page that you want to track.’. However, in their support section they are more specific: ‘Paste your snippet (unaltered, in its entirety) into every web page you want to track. Paste it immediately before the closing </head> tag.’--