WordPress is the most famous CMS (Content Management System). This is the CMS of choice for various reasons:
- This is free
- There are countless plugins and widgets
Now when we setup a new website, we need to see the analytics data to determine how our targets are being achieved. In order to setup the wordpress website for analytics, we can follow the following steps.
Setting up Google Analytics Account
We need to first setup analytics account. By the end of account creation, we should have a tracking code in the format of UA-XX….. We will be needing this in the next step.
Use Tracking Code on the Web Site
Now we need to connect our website with the Google Analytics account created above. The account creation makes it easier for us by providing some code we can add to our site. The code is in PHP. We need to add this code to a php file and include it in the page. It is good to add this to a part, which is included in all page displays (e.g. header / footer). This would save us from adding it on every page.
For a wordpress website, the community has developed a number of plugins for this purpose. They, not only, allow us to insert the analytics tracking to the website, but they also allow us to view the analytics data in the dashboard. There are a few plugins which makes the latter as optional. Here we are using Google Analyticator for this purpose.
Verifying Tracking Code
The easiest method of verifying the analytics setup on your website is using Google Webmaster tools. In order to use the tools for your website, we need to verify that we are the legitimate owners of the website. One of the options uses Google Analytics Tracking code. Since we have already inserted the tracking code there, it can just verify that the website is using the tracking code as attached to your account.
In order to verify if the plugin adds the tracking code successfully, we can view the page source of our website. To verify if the site is successfully providing tracking data to Google Analytics, we can use Google WebMaster tool. Here there are a number of options to verify that you are the owner of the website. One of the option is to use Google Analytics.