I get asked a lot how to add Google Analytics to a website. For WordPress this is really easy.
1) Go to http://google.com/analytics and sign up and add your website. They will give you some tracking code but just leave that page open for now.
3) Click Install Now, confirm and then click Activate.
4) Once done, go to Settings > Google Analytics. The easiest way to add the tracking code is to click the blue ‘Click here to authenticate with Google’ button. If you’re still logged in to Google Analytics you should just follow the steps to ‘Grant Access’ and then select your site in the dropdown. Then click the blue ‘Update Google Analytics Settings’ button to save.
However often this step fails for some reason, so you can check the box to ‘Manually enter your UA code’. This is the code in the tracking code given to you in Step 1) above. Write down the number you see beginning with UA- and then type that into the box, including the UA- part.
Then click the blue ‘Update Google Analytics Settings’ button to save.
Where do I view Google Analytics in WordPress?
Another source of confusion is once the above is all set up and working, where in WordPress do you view Google Analytics? The simple answer is you don’t, you do it on http://google.com/analytics in your account.