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.

8 Comments
I had the same exact problem
Submitted by Ezra on
I had the same exact problem before you published this post. Thanks for posting! Hopefully your post will clear up confusion for other people experiencing this problem!`
Yeah, I was bitten by this
Submitted by Mikkel Høgh on
Yeah, I was bitten by this as well. I guess the new settings structure makes more sense and all. Guess I should read the release notes next time...
The release notes only
Submitted by litrik on
The release notes only mention "Fixed wrong wordings about what is tracked or not" which is kinda vague IMHO. That doesn't sound like a behavioral change at all.
I'd avoided the Analytics
Submitted by gerard on
I'd avoided the Analytics module because they were using the old tracking code a while back. Nice to hear it's using the latest and greatest!
Run into the same issue and
Submitted by mariuss on
Run into the same issue and noticed it only after a while. This is pretty bad if you ask me.
The install script should have taken care of flipping the check boxes.
Wow, I had no idea. I
Submitted by Michelle on
Wow, I had no idea. I haven't been looking at analytics lately and it could have been ages before I figured it out. Thanks for the heads up!
Michelle
But now it's too late to
Submitted by Anonymous on
But now it's too late to flip... if we flip in a 1.5 all sites corrected this setting are broken... :-(
I had the same problem with
Submitted by Mindy Block on
I had the same problem with that description. I unchecked all the roles. Hopefully it will work. Thanks !
Add new comment