Google Analyticator - Version 1.54

Version Description

Download this release

Release Info

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

Code changes from version 1.53 to 1.54

google-analyticator/ga_external-links.js → ga_external-links.js RENAMED
File without changes
google-analyticator/google-analyticator.php → google-analyticator.php RENAMED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Google Analyticator
4
- * Version: 1.53
5
  * Plugin URI: http://cavemonkey50.com/code/google-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 options page</a> and enter your Google Analytics' UID and enable logging.
7
  * Author: Ronald Heft, Jr.
@@ -184,7 +184,7 @@ function ga_options_page() {
184
 
185
  echo "</select>\n";
186
  ?>
187
- <p style="margin: 5px 10px;">Disabling this option will prevent all logged in WordPress admins from showing up on your Google Analytics reports. A WordPress admin is defined as a user with a level 8 or higher. Your user level is <?php global $user_level; echo $user_level; ?>.</p>
188
  </td>
189
  </tr>
190
  <tr>
@@ -281,7 +281,6 @@ if (get_option(key_ga_footer) == ga_enabled) {
281
 
282
  // The guts of the Google Analytics script
283
  function add_google_analytics() {
284
- global $user_level;
285
  $uid = get_option(key_ga_uid);
286
  $extra = stripslashes(get_option(key_ga_extra));
287
  $extensions = str_replace (",", "|", get_option(key_ga_downloads));
@@ -290,7 +289,7 @@ function add_google_analytics() {
290
  if ((get_option(key_ga_status) != ga_disabled) && ($uid != "XX-XXXXX-X")) {
291
 
292
  // Track if admin tracking is enabled or disabled and less than user level 8
293
- if ((get_option(key_ga_admin) == ga_enabled) || ((get_option(key_ga_admin) == ga_disabled) && ($user_level < 8))) {
294
 
295
  echo "<!-- Google Analytics Tracking by Google Analyticator: http://cavemonkey50.com/code/google-analyticator/ -->\n";
296
  echo " <script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\"></script>\n";
1
  <?php
2
  /*
3
  * Plugin Name: Google Analyticator
4
+ * Version: 1.54
5
  * Plugin URI: http://cavemonkey50.com/code/google-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 options page</a> and enter your Google Analytics' UID and enable logging.
7
  * Author: Ronald Heft, Jr.
184
 
185
  echo "</select>\n";
186
  ?>
187
+ <p style="margin: 5px 10px;">Disabling this option will prevent all logged in WordPress admins from showing up on your Google Analytics reports. A WordPress admin is defined as a user with a level 8 or higher. Your user level <?php if ( current_user_can('level_8') ) echo 'is at least 8'; else echo 'is less than 8'; ?>.</p>
188
  </td>
189
  </tr>
190
  <tr>
281
 
282
  // The guts of the Google Analytics script
283
  function add_google_analytics() {
 
284
  $uid = get_option(key_ga_uid);
285
  $extra = stripslashes(get_option(key_ga_extra));
286
  $extensions = str_replace (",", "|", get_option(key_ga_downloads));
289
  if ((get_option(key_ga_status) != ga_disabled) && ($uid != "XX-XXXXX-X")) {
290
 
291
  // Track if admin tracking is enabled or disabled and less than user level 8
292
+ if ((get_option(key_ga_admin) == ga_enabled) || ((get_option(key_ga_admin) == ga_disabled) && ( !current_user_can('level_8') ))) {
293
 
294
  echo "<!-- Google Analytics Tracking by Google Analyticator: http://cavemonkey50.com/code/google-analyticator/ -->\n";
295
  echo " <script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\"></script>\n";
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: cavemonkey50
3
  Donate link: http://cavemonkey50.com/code/
4
  Tags: stats, google, analytics, tracking
5
  Requires at least: 2.0
6
- Tested up to: 2.2
7
- Stable tag: 1.53
8
 
9
  Adds the necessary JavaScript code to enable Google Analytics.
10
 
3
  Donate link: http://cavemonkey50.com/code/
4
  Tags: stats, google, analytics, tracking
5
  Requires at least: 2.0
6
+ Tested up to: 2.3
7
+ Stable tag: 1.54
8
 
9
  Adds the necessary JavaScript code to enable Google Analytics.
10