Next Tutorial
Drupal 7 Tutorial Part 15: Drupal 7 Advanced Taxonomy Concepts
How to add google analytics javascript code to Drupal Site ?
Install and Use google analytics module http://drupal.org/project/google_analytics provided by drupal.org community to easily install Google Analytics Javascript Code to your drupal site.
After installing this module you have full flexibilty to enable or disable the Google Analytics JS code in specific pages of your drupal site.
Stay tuned for more drupal tips :-)
©2010 AnilSagar. All rights reserved. Drupal theme by Kiwi Themes.

3 comments
Isn't it really silly and
Isn't it really silly and lame that we need a module to add simple Google analytics javascript code? This only goes to show the weakness of Drupal.
It Depends
Dear User,
It depends on requirement. In Drupal features are available as modules. Modules are optimized and tested by the community.
Google Analytics modules provides below functionality apart from just tracking code to the site.
Single/multi/cross domain tracking
Selectively track/exclude certain users, roles and pages
Monitor what type of links are tracked (downloads, outgoing and mailto)
Monitor what files are downloaded from your pages
Custom variables support with tokens
Custom code snippets
Site Search support
AdSense support
Tracking of Goals
Anonymize visitors IP address
Cache the Google Analytics code on your local server for improved page loading times
Access denied (403) and Page not found (404) tracking
DoNotTrack support (non-cached content only)
Drupal is not weak. Drupal is so powerful and flexible. You can add google analytics code with out a module also. Just insert the script code in page.tpl.php
Hope you will change your view on Drupal.
Cheers,
Anil Sagar
sam
nice post you shared.
Post new comment