Shall I install google analytics module or just put GA code in page.tpl file as there are too many modules and I dont want to add one more module. what do you suggest?
It is fine if you want to put the snippet in the page.tpl.php file. You will basically benefit Google Analytics module's conditional-snippet features.
If you put the snippet in page.tpl.php file,
Admin theme will not be tracked (which is usually Seven, which is in core - don't hack core!)
Users cannot opt-put for tracking (See your drupal.org account edit page for an example). this is independent from browser's Do Not Track (DNT) header.
You will find it difficult to track custom variables.
You will find it difficult to track events (downloads, etc). But you can put a modified static snippet and it should work as if it was from Google Analytics module. You can also track messages (
$messages) using GA module.
You will need to edit all your page.tpl.php variants to add the code.
Other modules will not be able to control your snippet. Not compatible with js_alters.
You will find it difficult to track internal search.
All users, including admin roles, which is usually not necessary to track.
Cache the code locally.
In my opinion (and some little home-done tests), caching the code locally is not a good idea. GA service is so popular so the chance of having a locally cached version of ga.js is very good. If you cache it, browser will have to download the same code from your server (But you can track users those who have blocked ga.js using AdBlock plugins).
For sites that I maintain in long run, I'm fine to use the snippet directly (in page.tpl.php or html.tpl.php). Many sites don't require A/B testing, goal tracking, custom variables and other bells and whistles. If you explicitly call
user_access(), or other functions, that's a signal that you might want to use GA module instead of the in-house coding.