Every blogger in the blogosphere is aware of the Google’s tracking service , Google Analytics. It is an essential tool to monitor the site traffic details and performance statistics. Anybody can setup an analytics account for free with their Google account. Users will be a given a unique js tracking snippet, which can be inserted to the website. When it comes to WordPress blogs, there are numerous plugins available for enabling analytics tracking on the blog.
But here we are going to see how to add the analytics script to the site template, ideally to the footer using your functions.php file.
The process is very simple, and only requisite is that the footer file should have the
hook enabled. Obviously all themes on web2feel has this enabled.
To get started, you need to open the functions.php file in your theme on any text editor. Then add the following php snippet to it.
Once added don’t forget to change the “UA-XXXXX-X” to your own unique tracking code.
# Remember : This process is template specific. If you added this to one template and later switch to another template, remember to add this script to its functions.php file also, to continue tracking.