https://www.drupal.org/node/264927#comment-9123705
Google Analytics 6.x-4.0 creates JavaScript for insertion in a preprocess function which works if you are using a templated theme but not with one like the core theme, Chameleon.
My workaround was to add the following at the very start of the function chameleon_page() in the chameleon.theme file. I also copied the entire theme to sites/all/themes to prevent the change being overwritten by core updates.
$dummy = null; googleanalytics_add_js($dummy, $dummy);
There may well be better ways to solve this problem.
I also observe that Google Analytics 6.x-4.0 inserts JavaScript in to the head, not the foot, of the page so I wonder if the print $closure tip is out of date.
TODO: Identify the root cause and fix if broken.
Comments
Comment #1
hass CreditAttribution: hass commentedComment #2
hass CreditAttribution: hass commentedThis seems to be enough, but is not the way how it should work:
Comment #4
hass CreditAttribution: hass commented