What are some easy ways to add Google Analytics to your WordPress blog? Google Analytics is a powerful tool that can help you track the number of visits to your site. It can also tell you much more, such as the kind of browser your visitor was using, which country they were in, and how long they stayed at your site. In this article, we show you an easy way to add Google Analytics to any WordPress site.
Sign Up for Google Analytics
To use Google Analytics, you’ll need a Google Analytics account. If you have a Gmail account, you can use that. If you don’t have one, you can create one along the way.
First, go to http://www.google.com/analytics and click on “Sign In To Google Analytics”. Log in with your Google (or Gmail) account. If you don’t have one, there is a link to create an account.
Once you log in you will be prompted to sign up for Google Analytics if you have not already done so. Click “Sign up”. You will only need to do this once.
Set Up Your First Tracking Account
If you have not added any sites to Google Analytics before, you will see a form to set up your account and add your first site. In Google Analytics terms, an “account” is the “top-most level of organization and contain one or more tracking IDs”. This means that an “account” is basically a collection of sites and apps you are tracking.
For your website information, fill out the form under “Setting up your property”, and click “Get Tracking ID”.
After agreeing to Google’s terms, you will be taken to the account page associated with your property. There you will see your tracking ID, in the form of
UA-XXXXXXX-X. Copy that number.
If you already set up a site, you should see the tracking ID near your property name when you log in.
Add Google Analytics to Your WordPress Site
To add your Google Analytics code to your WordPress site, download and install the Google Analytics by Yoast plugin. Once you activate it you should see an “Analytics” menu item in the left menu of your WordPress dashboard. Click on “Settings” under “Analytics”.
Here, you have two ways to add your Google Analytics code. You can add it by authenticating with your Google account, which means you will sign in to Google and allow the plugin to access your Google account. This give you a dashboard view of your analytics inside your WordPress admin.
If you don’t feel comfortable connecting your Google account, you can manually enter your UA code. Check the box “Manually enter your UA code” and a form will appear for you to paste in your Tracking ID you copied from Google Analytics.
By default, the plugin ignores users who are Administrators and Editors of your WordPress site. Their activities will not be tracked, which is useful so your editing activity doesn’t skew the final tracking results.