Here's an article I posted for http://www.joomlaexperiences.blogspot.com/ relevant also for installing Google Analytics script or code in Drupal. Tried the different Joomla google analytics modules but instead of trying to figure out how each works or is configured, I opted to try the manual, classic way of installing Google Analytics script in Joomla (or Drupal, and other opensource CMS) which is more foolproof. In one Joomla 1.0 project, I did the ff:
1. Registered the site in my Google Analytics account (your personal account can host multiple sites each with its own unique google analytics script generated and provided after successful signup).
2. When code/script was generated, determined which template the site uses.
3. In the template's index page (.../site/templates/templatename/index.php), I inserted the generated Google Analytics code/script provided for this site account just before the body closing tag.
4. After inserting the script in Joomla's template index page, go back to Google Analytics > Analytics Settings > Profile Settings for the site concerned > then click check status (somewhere in the upper right corner of the page).
5. Notice will be displayed if ga script was installed successfully, hence a "receiving data" status is given. One should just wait for the statistics to be generated then. 24 hour period should be sufficient waiting time.
Enjoy! Hope this helps!
P.S. the same should work with Drupal and other dynamic CMS templates irregardless of versions (just always make a backup copy of the template's index page for easy restoration if something didn't quite work).
Experiences with Drupal, the opensource portal or content management system (CMS), its installation, troubleshooting issues, maintenance, modules, themes, and other personal experiences.
Amazon products on Content Management Systems and PHP-MySQL
Showing posts with label google analytics. Show all posts
Showing posts with label google analytics. Show all posts
Friday, May 1, 2009
Tuesday, May 27, 2008
Google Analytics in Drupal
Been cracking my head in installing the Google Analytics script in my drupal sites. Have this drupal version 7 site, unfortunately the Google Analytics module available as of this writing is for versions 5 and up only. A dilemma for dynamic sites... Tried posting the script in the following as advised in www.drupal.org forum threads: template pages (page.tpl.php), index and incluldes, etc.
However, I think the best method that work for a test site is perhaps creating a block and publishing the google analytics script in there. To best have accurate analysis reports, publish analytics block accordingly, e.g. excluding the /node/edit* pages or /admin* pages. This way only anonymous visits are logged and recorded. On the other hand, reverse the publishing to determine administrative behaviors. Neat! Worked like a charm!
P.S.
Generated reports didn't come until after 24 hours... or a disclaimer from google that due to technical problems it may not generate some reports at all, somethin' like that... the adage, patience is a virtue... indeed!
However, I think the best method that work for a test site is perhaps creating a block and publishing the google analytics script in there. To best have accurate analysis reports, publish analytics block accordingly, e.g. excluding the /node/edit* pages or /admin* pages. This way only anonymous visits are logged and recorded. On the other hand, reverse the publishing to determine administrative behaviors. Neat! Worked like a charm!
P.S.
Generated reports didn't come until after 24 hours... or a disclaimer from google that due to technical problems it may not generate some reports at all, somethin' like that... the adage, patience is a virtue... indeed!
Subscribe to:
Posts (Atom)