Google Analytics is a must for your website, but some people are not sure where to put the analytics tracking code Google gives them in WordPress. Google says that you should add it to each page. How do you do that in WordPress? Easy, you only need to add it once to the header file header.php – here’s how.
1. Copy the code from your Google Analytics account
2. From your dashboard hover on Appearance on the left hand column and choose Editor
3. In the right hand column under Templates click header
4. Scroll down till you find </head> (you can always search for it by typing CTRL+F and then typing </head> in your search box).
5. Paste the Google Analytics code immediately ABOVE </head>.
6. Finally click Update File (blue button at bottom of the page).
That’s it. As with WordPress, it’s always easy when you know how!