Google Analyticator - Version 6.0.2

Version Description

  • Updates the async tracking snippet to the latest version provided by Google.
  • Improves the error message when failing to authenticate with Google, pointing users to a FAQ article to resolve their issues.
Download this release

Release Info

Developer cavemonkey50
Plugin Icon 128x128 Google Analyticator
Version 6.0.2
Comparing to
See all releases

Code changes from version 6.0.1 to 6.0.2

google-analyticator.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Google Analyticator
4
- * Version: 6.0.1
5
  * Plugin URI: http://ronaldheft.com/code/analyticator/
6
  * Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin visit <a href="options-general.php?page=google-analyticator.php">the settings page</a> and enter your Google Analytics' UID and enable logging.
7
  * Author: Ronald Heft
@@ -9,7 +9,7 @@
9
  * Text Domain: google-analyticator
10
  */
11
 
12
- define('GOOGLE_ANALYTICATOR_VERSION', '6.0.1');
13
 
14
  // Constants for enabled/disabled state
15
  define("ga_enabled", "enabled", true);
@@ -292,7 +292,7 @@ function ga_options_page() {
292
  <?php } else { ?>
293
  <p style="margin-top: 7px;"><?php _e('Currently authenticated with Google.', 'google-analyticator'); ?> <a href="<?php echo admin_url('/options-general.php?page=google-analyticator.php&token=deauth'); ?>"><?php _e('Deauthorize Google Analyticator.', 'google-analyticator'); ?></a></p>
294
  <?php if ( isset($_GET['token']) && $_GET['token'] != 'deauth' ) { ?>
295
- <p style="color: red; display: none;" id="ga_connect_error"><?php _e('Failed to authenticate with Google. Try using the compatibility options at the bottom of this page. If you are still unable to authenticate, contact your host, informing them you are experiencing errors with outbound SSL connections.', 'google-analyticator'); ?></p>
296
  <?php } ?>
297
  <?php } ?>
298
  <p style="margin: 5px 10px;" class="setting-description"><?php _e('Clicking the above link will authenticate Google Analyticator with Google. Authentication with Google is needed for use with the stats widget. In addition, authenticating will enable you to select your Analytics account through a drop-down instead of searching for your UID. If you are not going to use the stat widget, <strong>authenticating with Google is optional</strong>.', 'google-analyticator'); ?></p>
@@ -797,10 +797,9 @@ function add_google_analytics()
797
  ?>
798
 
799
  (function() {
800
- var ga = document.createElement('script');
801
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
802
- ga.setAttribute('async', 'true');
803
- document.documentElement.firstChild.appendChild(ga);
804
  })();
805
  </script>
806
  <?php
1
  <?php
2
  /*
3
  * Plugin Name: Google Analyticator
4
+ * Version: 6.0.2
5
  * Plugin URI: http://ronaldheft.com/code/analyticator/
6
  * Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin visit <a href="options-general.php?page=google-analyticator.php">the settings page</a> and enter your Google Analytics' UID and enable logging.
7
  * Author: Ronald Heft
9
  * Text Domain: google-analyticator
10
  */
11
 
12
+ define('GOOGLE_ANALYTICATOR_VERSION', '6.0.2');
13
 
14
  // Constants for enabled/disabled state
15
  define("ga_enabled", "enabled", true);
292
  <?php } else { ?>
293
  <p style="margin-top: 7px;"><?php _e('Currently authenticated with Google.', 'google-analyticator'); ?> <a href="<?php echo admin_url('/options-general.php?page=google-analyticator.php&token=deauth'); ?>"><?php _e('Deauthorize Google Analyticator.', 'google-analyticator'); ?></a></p>
294
  <?php if ( isset($_GET['token']) && $_GET['token'] != 'deauth' ) { ?>
295
+ <p style="color: red; display: none;" id="ga_connect_error"><?php _e('Failed to authenticate with Google. <a href="http://forums.ronaldheft.com/viewtopic.php?f=5&t=851">Read this support article</a> on Analyticator\'s support forums for help.', 'google-analyticator'); ?></p>
296
  <?php } ?>
297
  <?php } ?>
298
  <p style="margin: 5px 10px;" class="setting-description"><?php _e('Clicking the above link will authenticate Google Analyticator with Google. Authentication with Google is needed for use with the stats widget. In addition, authenticating will enable you to select your Analytics account through a drop-down instead of searching for your UID. If you are not going to use the stat widget, <strong>authenticating with Google is optional</strong>.', 'google-analyticator'); ?></p>
797
  ?>
798
 
799
  (function() {
800
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
801
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
802
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
 
803
  })();
804
  </script>
805
  <?php
google-analytics-summary-widget.php CHANGED
@@ -94,7 +94,7 @@ class GoogleAnalyticsSummary
94
  **/
95
  function widget()
96
  {
97
- echo '<small>' . __('Loading') . '...</small>';
98
  echo '<div class="target" style="display: none;"></div>';
99
  }
100
 
94
  **/
95
  function widget()
96
  {
97
+ echo '<small>' . __('Loading', 'google-analyticator') . '...</small>';
98
  echo '<div class="target" style="display: none;"></div>';
99
  }
100
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://ronaldheft.com/code/donate/
4
  Tags: stats, statistics, google, analytics, google analytics, tracking, widget
5
  Requires at least: 2.7
6
  Tested up to: 2.9
7
- Stable tag: 6.0.1
8
 
9
  Adds the necessary JavaScript code to enable Google Analytics. Includes widgets for Analytics data display.
10
 
@@ -49,7 +49,11 @@ Please visit [Google Analyticator's support forum](http://forums.ronaldheft.com/
49
 
50
  == Changelog ==
51
 
52
- = 6.0.1=
 
 
 
 
53
  * Adds a missing closing quote on setVar - admin. If you use this option, update ASAP to prevent Javascript from breaking.
54
 
55
  = 6.0 =
4
  Tags: stats, statistics, google, analytics, google analytics, tracking, widget
5
  Requires at least: 2.7
6
  Tested up to: 2.9
7
+ Stable tag: 6.0.2
8
 
9
  Adds the necessary JavaScript code to enable Google Analytics. Includes widgets for Analytics data display.
10
 
49
 
50
  == Changelog ==
51
 
52
+ = 6.0.2 =
53
+ * Updates the async tracking snippet to the latest version provided by Google.
54
+ * Improves the error message when failing to authenticate with Google, pointing users to a FAQ article to resolve their issues.
55
+
56
+ = 6.0.1 =
57
  * Adds a missing closing quote on setVar - admin. If you use this option, update ASAP to prevent Javascript from breaking.
58
 
59
  = 6.0 =