Commit 02440a97 authored by hass's avatar hass
Browse files

* Issue #1968286 by hass: Uninstall of 'googleanalytics_trackmessages'

variable is missing
* Windows line feeds removal
parent 6822a4ca
......@@ -38,6 +38,7 @@ function googleanalytics_uninstall() {
variable_del('googleanalytics_site_search');
variable_del('googleanalytics_trackadsense'); // @todo
variable_del('googleanalytics_trackdoubleclick'); // @todo
variable_del('googleanalytics_trackmessages');
variable_del('googleanalytics_tracker_anonymizeip');
variable_del('googleanalytics_trackfiles');
variable_del('googleanalytics_trackfiles_extensions');
......@@ -46,7 +47,7 @@ function googleanalytics_uninstall() {
variable_del('googleanalytics_translation_set');
variable_del('googleanalytics_visibility_pages');
variable_del('googleanalytics_visibility_roles');
variable_del('googleanalytics_privacy_donottrack');
variable_del('googleanalytics_privacy_donottrack');
// Remove backup variables if exist. Remove this code in D8.
variable_del('googleanalytics_codesnippet_after_backup_6300');
......
......@@ -227,10 +227,10 @@ function googleanalytics_page_alter(&$page) {
} */
// Build tracker code.
$script = '(function(i,s,o,g,r,a,m){';
$script .= 'i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){';
$script .= '(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),';
$script .= 'm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)';
$script = '(function(i,s,o,g,r,a,m){';
$script .= 'i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){';
$script .= '(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),';
$script .= 'm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)';
$script .= '})(window,document,"script",';
// Which version of the tracking library should be used?
......@@ -259,8 +259,8 @@ function googleanalytics_page_alter(&$page) {
$script .= 'ga("set", "anonymizeIp", 1);';
}
// Prepare Adsense tracking.
$googleanalytics_adsense_script = 'window.google_analytics_uacct = ' . drupal_json_encode($id) . ';';
// Prepare Adsense tracking.
$googleanalytics_adsense_script = 'window.google_analytics_uacct = ' . drupal_json_encode($id) . ';';
// Domain tracking type.
global $cookie_domain;
......@@ -298,13 +298,13 @@ function googleanalytics_page_alter(&$page) {
}
// @TODO: not available yet, comming soon per Google.
//if (variable_get('googleanalytics_trackadsense', FALSE)) {
// Custom tracking. Prepend before all other JavaScript.
// @TODO: http://support.google.com/adsense/bin/answer.py?answer=98142
// sounds like it could be appended to $script.
//drupal_add_js($googleanalytics_adsense_script, array('type' => 'inline', 'group' => JS_LIBRARY-1));
//}
//if (variable_get('googleanalytics_trackadsense', FALSE)) {
// Custom tracking. Prepend before all other JavaScript.
// @TODO: http://support.google.com/adsense/bin/answer.py?answer=98142
// sounds like it could be appended to $script.
//drupal_add_js($googleanalytics_adsense_script, array('type' => 'inline', 'group' => JS_LIBRARY-1));
//}
drupal_add_js($script, array('scope' => $scope, 'type' => 'inline'));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment