moved google analytics to the top

to make it available throughout the script