I have recently tried to implement Google Analytics on a web I’m working on. And it has been an awful experience because there’s so little documentation for people who wants to use multiple trackers. I can’t give a thorough, detailed, and full of picture tutorial about this because that would cost so much time. But I’ll try to cover as much and as detailed as I can.
What is Google Analytics? In short, this is a free statistic service offered by Google to analyze the visitors behavior your website. This service can record everything you supply, from how much a page is opened, to what page element the user interacted with, for example, how many the play video button is clicked. Some people finds statistic boring, but in the hands of people who understand statistic, these data can be used to inform which part of the website needs to be improved, or need focus. For example, if we can get the data that user click 1000 times on promotion A banner, and 5000 times on promotion B banner, then that means promotion B banner is more interesting, thus we need more promotion like promotion B than promotion A.
Google Analytics (GA) vs Universal Analytics (UA)
Google Analytics (ga.js) is the obsolete and out of date implementation. The Universal Analytics (analytics.js) is the new and modern implementation. Both developed by Google, and both are Google Analytics. Mindblown? Me too. But just refer them as ga.js and analytics.js, and people around the world will know which one you’re talking about. For this tutorial, we will stick to the newest implementation, analytics.js.