Installing Google Analytics is probably one of the very early tasks of setting up a WordPress website. Do not make the mistake I made in my early days by waiting for the official site launch. You will likely get traffic once your site is visible to Google (you are not blocking Google from your site), and once you publish your first few posts. Note, this instruction is completely for beginners, and a great tool for me when I am setting up my websites.
Basic Google Analytics Set-Up
1. Install Google Analytics for WordPress by Joost de Valk (Yoast)
2. Sign into Google and go to google.com/analytics
3. Click on Admin, and create a new account.
4. Set up your web property by filling in the website name, url, industry category, and reporting time zone.
5. Accept Google’s terms of service.
6. You’ll see a confirmation page with your unique tracking ID. Put this tracking ID in your Google Analytics for WordPress plugin (you can do this manually).
Filter Your IP Address from your Google Analytics View
7. Go back to google.com/analytics and create a profile to filter out traffic from your IP address. You can do this by going back to Admin, selecting your new google analytics account, and selecting the drop-down under View (Profile). Select “Create New View”. Under Reporting View Name, enter something like “Your Site Name – No Internal traffic”, and enter your time zone.
8. Click on Filters, add a new filter called “Home IP Exclusion”, and leave the settings as Exclude Traffic from the IP Addresses that are equal to, and enter your ip address. You can get your ip address by going to http://whatismyipaddress.com/. This is the IP address you want to exclude. Hit save.
9. Now, verify whether the GA install was successful. Go to any page on your website, right-click and hit “View Source Code”. If you search for “ga.js”, and it appears, you have success!!!
So that’s it, you now have Google Analytics tracking installed on your website. Good luck!