This article discusses several ways you can use Google Analytics with a WordPress site.
USING GOOGLE ANALYTICS WITH WORDPRESS
Google Analytics provides detailed statistics about visitor traffic to your site. To use Google Analytics with WordPress (or with any other type of site), you must first sign up for a Google Analytics account at http://www.google.com/analytics and obtain a unique Tracking ID.
After you have set up a Google Analytics account and have the Tracking ID for your site, you can configure it for WordPress. There are two ways to do this:
- Use a WordPress plugin.
- Edit the WordPress theme.
Method #1: Use a plugin
There are numerous plugins that enable you to configure Google Analytics for a WordPress site, and they all function in essentially the same way—all you have to do is specify your Tracking ID, and the plugin takes care of the rest.
Here are some popular Google Analytics plugins for WordPress:
Method #2: Edit the theme
Plugins are convenient, but they also carry processing overhead with them that can affect site performance. If you prefer not to use a plugin, you can edit the WordPress theme directly to enable Google Analytics.
To enable Google Analytics by editing the theme, follow these steps:
- Log in to your Google Analytics account, click Admin, click Tracking Info, and then click Tracking Code. Copy the entire text in the tracking code box, including the starting <script> tag and the ending </script> tag.
- Log in to WordPress as the administrator.
- Under Dashboard, click Appearance, and then click Editor. The Edit Themes page appears.
- Under Templates, click Header (header.php).
- Locate the ending </head> tag. Just above the </head> tag, paste the Tracking ID code snippet from Google Analytics that you obtained in step 1.
- Click . Google Analytics is now enabled for all pages on your WordPress site.
For more information about Google Analytics, please visit http://www.google.com/analytics.
- wordpress, google, analytics
- 0 Users Found This Useful
This article describes how to install WordPress using the Softaculous installer in cPanel....
This article describes how to install WordPress on a subdomain using cPanel and Softaculous....
WordPress includes thousands of free themes that you can use to customize your web site's...
How to install WordPress manually This article describes how to manually install the popular...