You can add Google Analytics to Joomla in 3 main ways. 1) Tweak the template code directly, 2) Use a plugin, 3) Use GA support built-in to a template for framework such as Gantry.