Google Analytics, analysing traffic and where it comes from is very important for a webmaster to do on all of their sites.
It’s another of those two minute jobs that sometimes gets overlooked. It can be quite addictive looking at what your visitors have been looking at on your site. It will also help improve the overall experience your loyal visitors have when there, if you act on what visitors don’t seem to like that is and enhance what they do!
So here is the very simple yet not always apparent way to install Google Analytics to a website.
First of all create a Google Analytics account
Once inside your account click the link to add a site. Then click finish.
You will then see a box with lots of code in it looking similar to this
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
var pageTracker = _gat._getTracker(“UA-xxxxxxx-x”);
Copy this code EXACTLY as it is into the position described below.
For sites that have a theme or template system find the footer.php file and place the google analytics code just above the </body> tag. Doing this in the template will ensure the code is put on every page you currently have and every page you create in the future.
For BANS users go to templates select the footer.php file near the top of the page and paste the code again just above </body>. Don’t forget to save your work.
I should say here that if your site does not have a common theme (template) then you will need to install the google code onto each page you have already or go on to create in the future just above </body> in the html files.
If you have installed the code correctly Google Analytics will default to saying something like “collecting data”. Check back in 24hours for your first results. If the code has not been installed correctly this will be apparent on your Google Analytics dashboard. It will say “tracking not installed”. Most likely this will be a simple fix. Any issues post a comment and I will see if I can help.
Installing this simple little script will give you tons of informed data about your visitors. Google Analytics works on human generated data only so you can be sure it isn’t collecting the data of the robots (bots) visiting your site. Use the information returned to keep your site a top quality place for visitors to come. You will of course also learn what is working from a marketing point of view and what isn’t, vital!
Hope you found this useful.