Google Analytics stopped tracking

Earlier this week I upgraded a couple of Drupal installations from 5.6 to 5.7. At the same time I also upgraded the Google Analytics module from 1.3 to 1.4. Yesterday I noticed that Google Analytics was no longer tracking any of these sites, even though they showed up as "Receiving Data" in the Google Analytics user interface.

The culprit had to be the upgrade of the google_analytics module. I checked the HTML source of my site and there was no longer any code to do the visitor tracking. Strange.

A little bit of searching revealed that the semantics of tracking of user roles had been changed. Previously (in 1.3) the setting said "Define what user roles should not be tracked by Google Analytics." (emphasis mine) but in the current version (1.4) it says "Define what user roles should be tracked by Google Analytics.". The exact opposite.

There is another related bug which also shows some of the confusion caused by the changed behavior.

I quickly toggled the checkbox of each role on the settings page of the Google Analytics module and everything started working again.

BTW: When you're modifying the settings of the Google Analytics module, you might also want to deselect the Legacy Google Analytics setting. This way you'll start using the new tracking code where Google is adding all new features.

Topic: 

8 Comments

Add new comment