Google Analytics and Drupal

Tags:

You've just downloaded and installed and activated the google_analytics Drupal module, added your Google Analytics User ID but it's not working. You check the page source, but the script does not appear.

You are aware that the script does not show up when you are on admin pages (and of course you wouldn't want it to) and you have checked from your home page.

If you are using a custom theme, the answer may be simple. Check you page.tpl file to make sure that you have the following line just before the closing <body> tag:

<?php print $closure;?>

From the page.tpl.php reference

$closure - Needs to be displayed at the bottom of the page, for any dynamic javascript that needs to be called once the page has already been displayed.

Without it google analytical will not show up!

Google Analytics and Drupal

you are right it is not working. thanks

Submitted by CRM (not verified) on Thu, 2011-07-14 21:49.

This is really nice. thanks

This is really nice. thanks for a very informative post

Submitted by Advanced Concrete designs (not verified) on Thu, 2011-07-21 22:23.