0

The Google Analytics module on a brand new Drupal 7 build just stopped tracking after 7 days. When I went to investigate, I checked the settings, all appeared fine. Then I checked the source of the page, and the analytics code was nowhere to be seen.

For now I have just added in the javascript within html.tpl.php. But I am curious why it has just stopped working for no apparent reason? A bug with the module?

This site is using a custom theme. I checked the html.tpl.php and $header and $page_bottom variables were all there.

Any ideas why this may be?

1

I don't see any current bugs like this in the issue queue of the module. So let's check the following:

  • What's up with the theme you're using? Have you tried this with another theme?
  • What performance settings do you use? (Is Javascript aggregation enabled? Do you use page caching?)
  • Is the Analytics code missing from the output when you're logged in as user 1? (If it's there, what's happened with the permissions of the module?)
  • 1
    Try all of this. Make sure (duh) that Google Analytics module is actually enabled. Install devel module and run dpm($vars) on hook_preprocess_html in your theme's template.php. If you still don't see any output from analytics, delete your module and grab a fresh copy. If it's still not outputting, throw some dpm()'s in the google_analytics.module and see what's not getting run or what's not adding the JS. – Charlie Schliesser Feb 28 '12 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.