'description'=>$t('Google Analytics module has debugging enabled. Please disable debugging setting in production sites from the <a href="@url">Google Analytics settings page</a>.',array('@url'=>url('admin/config/system/googleanalytics'))),
'description'=>$t('Google Analytics module has debugging enabled. Please disable debugging setting in production sites from the <a href="@url">Google Analytics settings page</a>.',array('@url'=>url('admin/config/system/googleanalytics'))),
'severity'=>REQUIREMENT_WARNING,
'severity'=>REQUIREMENT_WARNING,
'value'=>$t('Debugging enabled'),
'value'=>$t('Debugging enabled'),
);
);
}
}
}
return$requirements;
return$requirements;
...
@@ -445,7 +443,7 @@ function googleanalytics_update_7200() {
...
@@ -445,7 +443,7 @@ function googleanalytics_update_7200() {
// ga.js code will cause the tracker to break. Remove custom code snippets.
// ga.js code will cause the tracker to break. Remove custom code snippets.
drupal_set_message(Database::getConnection()->prefixTables("A backup of your previous Google Analytics code snippet has been saved in database table '{variable}' as 'googleanalytics_codesnippet_before_backup_7200'. You need to manually upgrade the custom 'before' code snippet."),'warning');
drupal_set_message(Database::getConnection()->prefixTables("A backup of your previous Google Analytics code snippet has been saved in database table '{variable}' as 'googleanalytics_codesnippet_before_backup_7200'. You need to manually upgrade the custom 'before' code snippet."),'warning');
...
@@ -453,7 +451,7 @@ function googleanalytics_update_7200() {
...
@@ -453,7 +451,7 @@ function googleanalytics_update_7200() {
drupal_set_message(Database::getConnection()->prefixTables("A backup of your previous Google Analytics code snippet has been saved in database table '{variable}' as 'googleanalytics_codesnippet_before_backup_7200'. You need to manually upgrade the custom 'before' code snippet."),'warning');
drupal_set_message(Database::getConnection()->prefixTables("A backup of your previous Google Analytics code snippet has been saved in database table '{variable}' as 'googleanalytics_codesnippet_before_backup_7200'. You need to manually upgrade the custom 'before' code snippet."),'warning');
...
@@ -481,3 +479,59 @@ function googleanalytics_update_7202() {
...
@@ -481,3 +479,59 @@ function googleanalytics_update_7202() {
@@ -48,7 +48,7 @@ Drupal.googleanalytics.test.assertFalse = function (value1, message) {
...
@@ -48,7 +48,7 @@ Drupal.googleanalytics.test.assertFalse = function (value1, message) {
else{
else{
console.error(message);
console.error(message);
}
}
}
};
// Run after the documented is ready or Drupal.settings is undefined.
// Run after the documented is ready or Drupal.settings is undefined.
$(document).ready(function(){
$(document).ready(function(){
...
@@ -86,8 +86,8 @@ $(document).ready(function() {
...
@@ -86,8 +86,8 @@ $(document).ready(function() {
console.groupEnd();
console.groupEnd();
console.group("Test 'getPageUrl':");
console.group("Test 'getPageUrl':");
Drupal.googleanalytics.test.assertSame(base_path+'node/1',Drupal.googleanalytics.getPageUrl(base_url+Drupal.settings.basePath+'node/1'),"Absolute internal URL '"+Drupal.settings.basePath+"node/1' has been extracted from full qualified url '"+base_url+base_path+"node/1'.");
Drupal.googleanalytics.test.assertSame(base_path,Drupal.googleanalytics.getPageUrl(base_url+Drupal.settings.basePath+'node/1'),"Absolute internal URL '"+Drupal.settings.basePath+"node/1' has been extracted from full qualified url '"+base_url+base_path+"'.");
Drupal.googleanalytics.test.assertSame(base_path+'node/1',Drupal.googleanalytics.getPageUrl(Drupal.settings.basePath+'node/1'),"Absolute internal URL '"+Drupal.settings.basePath+"node/1' has been extracted from absolute url '"+base_path+"node/1'.");
Drupal.googleanalytics.test.assertSame(base_path,Drupal.googleanalytics.getPageUrl(Drupal.settings.basePath+'node/1'),"Absolute internal URL '"+Drupal.settings.basePath+"node/1' has been extracted from absolute url '"+base_path+"'.");
Drupal.googleanalytics.test.assertSame('http://example.com/node/2',Drupal.googleanalytics.getPageUrl('http://example.com/node/2'),"Full qualified external url 'http://example.com/node/2' has been extracted.");
Drupal.googleanalytics.test.assertSame('http://example.com/node/2',Drupal.googleanalytics.getPageUrl('http://example.com/node/2'),"Full qualified external url 'http://example.com/node/2' has been extracted.");
Drupal.googleanalytics.test.assertSame('//example.com/node/2',Drupal.googleanalytics.getPageUrl('//example.com/node/2'),"Full qualified external url '//example.com/node/2' has been extracted.");
Drupal.googleanalytics.test.assertSame('//example.com/node/2',Drupal.googleanalytics.getPageUrl('//example.com/node/2'),"Full qualified external url '//example.com/node/2' has been extracted.");