Google Analyticator - Version 2.24

Version Description

Download this release

Release Info

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

Code changes from version 2.23 to 2.24

Files changed (2) hide show
  1. google-analyticator.php +2 -20
  2. readme.txt +8 -5
google-analyticator.php CHANGED
@@ -1,11 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Google Analyticator
4
- <<<<<<< .mine
5
- * Version: 2.23
6
- =======
7
- * Version: 2.22
8
- >>>>>>> .r78429
9
  * Plugin URI: http://cavemonkey50.com/code/google-analyticator/
10
  * 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.
11
  * Author: Ronald Heft, Jr.
@@ -438,7 +434,7 @@ function ga_outgoing_links() {
438
  if (get_option(key_ga_outbound) == ga_enabled) {
439
  if ((get_option(key_ga_admin) == ga_enabled) || ((get_option(key_ga_admin) == ga_disabled) && ( !current_user_can('level_' . get_option(key_ga_admin_level)) ))) {
440
  add_filter('comment_text', 'ga_outgoing', -10);
441
- add_filter('get_comment_author_link', 'ga_outgoing_comment_author', -10);
442
  add_filter('the_content', 'ga_outgoing', -10);
443
  add_filter('the_excerpt', 'ga_outgoing', -10);
444
  }
@@ -456,20 +452,6 @@ function ga_outgoing($input) {
456
  return $input;
457
  }
458
 
459
- // Takes the comment author link and adds the Google outgoing tracking code
460
- function ga_outgoing_comment_author($input) {
461
- static $link_pattern = '(.*href\s*=\s*)[\"\']*(.*?)[\"\'] (.*)';
462
- ereg($link_pattern, $input, $matches);
463
- if ($matches[2] == "") return $input;
464
-
465
- $target = ga_find_domain($matches[2]);
466
- $local_host = ga_find_domain($_SERVER["HTTP_HOST"]);
467
- if ( $target["domain"] != $local_host["domain"] ){
468
- $tracker_code .= "onclick=\"javascript:pageTracker._trackPageview ('/outbound/".$target["host"]."');\"";
469
- }
470
- return $matches[1] . "\"" . $matches[2] . "\" " . $tracker_code . " " . $matches[3];
471
- }
472
-
473
  // Takes a link and adds the Google outgoing tracking code
474
  function ga_parse_link($matches){
475
  $local_host = ga_find_domain($_SERVER["HTTP_HOST"]);
1
  <?php
2
  /*
3
  * Plugin Name: Google Analyticator
4
+ * Version: 2.24
 
 
 
 
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.
434
  if (get_option(key_ga_outbound) == ga_enabled) {
435
  if ((get_option(key_ga_admin) == ga_enabled) || ((get_option(key_ga_admin) == ga_disabled) && ( !current_user_can('level_' . get_option(key_ga_admin_level)) ))) {
436
  add_filter('comment_text', 'ga_outgoing', -10);
437
+ add_filter('get_comment_author_link', 'ga_outgoing', -10);
438
  add_filter('the_content', 'ga_outgoing', -10);
439
  add_filter('the_excerpt', 'ga_outgoing', -10);
440
  }
452
  return $input;
453
  }
454
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  // Takes a link and adds the Google outgoing tracking code
456
  function ga_parse_link($matches){
457
  $local_host = ga_find_domain($_SERVER["HTTP_HOST"]);
readme.txt CHANGED
@@ -4,11 +4,7 @@ Donate link: http://cavemonkey50.com/code/
4
  Tags: stats, google, analytics, tracking
5
  Requires at least: 2.3
6
  Tested up to: 2.7
7
- <<<<<<< .mine
8
- Stable tag: 2.23
9
- =======
10
- Stable tag: 2.22
11
- >>>>>>> .r78429
12
 
13
  Adds the necessary JavaScript code to enable Google Analytics.
14
 
@@ -59,6 +55,13 @@ Google's servers are slow at crawling for the tracking code. While the code may
59
 
60
  == Changelog ==
61
 
 
 
 
 
 
 
 
62
  **2.22** - Bug Fix
63
  - Improves comment author regex causing some issues in WordPress 2.7. Props jdub.
64
 
4
  Tags: stats, google, analytics, tracking
5
  Requires at least: 2.3
6
  Tested up to: 2.7
7
+ Stable tag: 2.24
 
 
 
 
8
 
9
  Adds the necessary JavaScript code to enable Google Analytics.
10
 
55
 
56
  == Changelog ==
57
 
58
+ **2.24** - Critical Bug Fix
59
+ - Fixes comment author issues once and for all.
60
+ - Fixes a SVN merge issue that prevented people from getting the last update.
61
+
62
+ **2.23** - Bug Fix
63
+ - Reverting last version as it caused issues.
64
+
65
  **2.22** - Bug Fix
66
  - Improves comment author regex causing some issues in WordPress 2.7. Props jdub.
67