No google tracking code in source for Firefox 18.0.2 when "Universal web tracking opt-out" is checked (regardless of whether or not "Do not track" is enabled in the browser).

Setup 1
Drupal 7.19 - Caching off, no other caching modules enabled (Boost installed, but not enabled)
Googleanalytics 7.x-1.2 - Tracking all roles, Universal web tracking opt-out checked

View site in Firefox 18.0.2 - Cache disabled, "Do not track" disabled, anonymous user: No google tracking code in pages
View site in Firefox 18.0.2 - Cache disabled, "Do not track" enabled, anonymous user: No google tracking code in pages
View site in Chrome Version 24.0.1312.57 - Freshly deleted cache, anonymous user: Tracking code in the page
View site in IE9 - Freshly deleted cache, anonymous user: Tracking code in the page

Setup 2
As above, but with No privacy in the Google Analytics module settings (i.e. unchecked "Universal web tracking opt-out").

View site in Firefox 18.0.2 - Cache disabled, "Do not track" disabled, anonymous user: Tracking code in the page
View site in Firefox 18.0.2 - Cache disabled, "Do not track" enabled, anonymous user: Tracking code in the page
View site in Chrome Version 24.0.1312.57 - Freshly deleted cache, anonymous user: Tracking code in the page
View site in IE9 - Freshly deleted cache, anonymous user: Tracking code in the page

Comments

leo pitt’s picture

Status: Active » Closed (works as designed)

Okay, I think I have found the cause of my problem - maybe this will be helpful for someone else, and save them some frustration:

The Firefox NoScript add-on sets the DNT header attribute to 1, regardless of whether Do Not Track is switched on or off in Firefox settings. Remove NoScript and everything works as expected.

Related post on Mozilla site: https://bugzilla.mozilla.org/show_bug.cgi?id=666142

leo pitt’s picture

Issue summary: View changes

Formatting

matthewv789’s picture

As someone finally pointed out in https://drupal.org/node/1797988, this module will NOT insert the code in the page for anonymous users or with page caching if this setting is enabled. (There is some text buried next to the setting which does mention this.)

So the workaround is:
- Always uncheck this box.

And the fix for the module should be:
- Uncheck this by default
- Make the explanation that the GA functionality will not work for anonymous users if this is checked much more prominent.

hass’s picture

This is not correct. The checkbox has no effect if page caching is enabled - checked or unchecked doesn't matter.