One of the very first things to do after creating a new website is to make sure that you can monitor how many people are visiting your site, what they are looking at, how long they are staying, etc.
Google Analytics does a pretty decent job at tracking this information, but it’s quite tricky to figure out at first. Although, once you know what to do it’s actually pretty straight-forward!
Sign up for Google Analytics
Go to the Google Analytics homepage and sign up:
Enter the information in the next page, such as Account name, website name, URL, etc.
You are now provided with a block of code that contains your unique identifier.
Paste code into your website
You now need to paste this information into your site, in a place where it will be activated every time someone visits your site. A good spot would be your header script as it’s one of the first elements to load when someone views your website.
If you are running the StudioPress Genesis theme this is super easy. Four quick and painless steps:
- Sign into your WordPress Admin dashboard.
- Select Genesis > Theme Settings
- Paste the code from above in the wp_head() section (i.e. the header):
And that’s it! Google Analytics is set up on your site
It takes a while for the setup to complete in the background, so the code probably won’t be active immediately. You can always go back to Google Analytics a bit later and confirm that the new tracking code is working properly, by clicking on Tracking Info in the Property section, in the Admin tab:
When things are working properly, you will see the following message:
I highly suggest you also check out this post by Analytics Edge describing the steps you need to take to block referral spam that pollutes your stats with fake hits and links.