Google Analyticator - Version 2.13

Version Description

Download this release

Release Info

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

Code changes from version 2.12 to 2.13

Files changed (2) hide show
  1. google-analyticator.php +12 -10
  2. readme.txt +4 -1
google-analyticator.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/*
3
* Plugin Name: Google Analyticator
4
- * Version: 2.12
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.
@@ -123,7 +123,7 @@ function ga_options_page() {
123
?>
124
125
<div class="wrap">
126
- <form method="post" action="options-general.php?page=google-analyticator.php">
127
<?php ga_nonce_field(); ?>
128
<h2>Google Analyticator Options</h2>
129
<h3>Basic Options</h3>
@@ -299,7 +299,7 @@ function ga_options_page() {
299
echo "id='".key_ga_extra."'>";
300
echo stripslashes(get_option(key_ga_extra))."</textarea>\n";
301
?>
302
- <p style="margin: 5px 10px;">Enter any additional lines of tracking code that you would like to include in the Google Anayltics tracking script. The code in this section will be displayed <strong>before</strong> the Google Analytics tracker is initialized. Read <a href="http://www.google.com/analytics/InstallingGATrackingCode.pdf">Google Analytics tracker manual</a> to learn what code goes here and how to use it.</p>
303
</td>
304
</tr>
305
<tr>
@@ -313,7 +313,7 @@ function ga_options_page() {
313
echo "id='".key_ga_extra_after."'>";
314
echo stripslashes(get_option(key_ga_extra_after))."</textarea>\n";
315
?>
316
- <p style="margin: 5px 10px;">Enter any additional lines of tracking code that you would like to include in the Google Anayltics tracking script. The code in this section will be displayed <strong>after</strong> the Google Analytics tracker is initialized. Read <a href="http://www.google.com/analytics/InstallingGATrackingCode.pdf">Google Analytics tracker manual</a> to learn what code goes here and how to use it.</p>
317
</td>
318
</tr>
319
</table>
@@ -374,12 +374,14 @@ function add_google_analytics() {
374
375
// Add the ougoing links script
376
function ga_outgoing_links() {
377
- if (get_option(key_ga_outbound) == ga_enabled) {
378
- 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)) ))) {
379
- add_filter('comment_text', 'ga_outgoing', -10);
380
- add_filter('get_comment_author_link', 'ga_outgoing_comment_author', -10);
381
- add_filter('the_content', 'ga_outgoing', -10);
382
- add_filter('the_excerpt', 'ga_outgoing', -10);
383
}
384
}
385
}
1
<?php
2
/*
3
* Plugin Name: Google Analyticator
4
+ * Version: 2.13
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.
123
?>
124
125
<div class="wrap">
126
+ <form method="post" action="<?php echo get_option('root'); ?>/wp-admin/options-general.php?page=google-analyticator.php">
127
<?php ga_nonce_field(); ?>
128
<h2>Google Analyticator Options</h2>
129
<h3>Basic Options</h3>
299
echo "id='".key_ga_extra."'>";
300
echo stripslashes(get_option(key_ga_extra))."</textarea>\n";
301
?>
302
+ <p style="margin: 5px 10px;">Enter any additional lines of tracking code that you would like to include in the Google Analytics tracking script. The code in this section will be displayed <strong>before</strong> the Google Analytics tracker is initialized. Read <a href="http://www.google.com/analytics/InstallingGATrackingCode.pdf">Google Analytics tracker manual</a> to learn what code goes here and how to use it.</p>
303
</td>
304
</tr>
305
<tr>
313
echo "id='".key_ga_extra_after."'>";
314
echo stripslashes(get_option(key_ga_extra_after))."</textarea>\n";
315
?>
316
+ <p style="margin: 5px 10px;">Enter any additional lines of tracking code that you would like to include in the Google Analytics tracking script. The code in this section will be displayed <strong>after</strong> the Google Analytics tracker is initialized. Read <a href="http://www.google.com/analytics/InstallingGATrackingCode.pdf">Google Analytics tracker manual</a> to learn what code goes here and how to use it.</p>
317
</td>
318
</tr>
319
</table>
374
375
// Add the ougoing links script
376
function ga_outgoing_links() {
377
+ if ( !is_feed() ) {
378
+ if (get_option(key_ga_outbound) == ga_enabled) {
379
+ 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)) ))) {
380
+ add_filter('comment_text', 'ga_outgoing', -10);
381
+ add_filter('get_comment_author_link', 'ga_outgoing_comment_author', -10);
382
+ add_filter('the_content', 'ga_outgoing', -10);
383
+ add_filter('the_excerpt', 'ga_outgoing', -10);
384
+ }
385
}
386
}
387
}
readme.txt CHANGED
@@ -4,7 +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.6
7
- Stable tag: 2.12
8
9
Adds the necessary JavaScript code to enable Google Analytics.
10
@@ -55,6 +55,9 @@ Google's servers are slow at crawling for the tracking code. While the code may
55
56
== Changelog ==
57
58
**2.12** - Bug Fix
59
60
- Applies the new administrator level selection to outbound tracking (I forgot to that in the last release).
4
Tags: stats, google, analytics, tracking
5
Requires at least: 2.3
6
Tested up to: 2.6
7
+ Stable tag: 2.13
8
9
Adds the necessary JavaScript code to enable Google Analytics.
10
55
56
== Changelog ==
57
58
+ **2.13** - Bug Fix
59
+ - Stops the external link tracking code from appearing in feeds, breaking feed validation.
60
+
61
**2.12** - Bug Fix
62
63
- Applies the new administrator level selection to outbound tracking (I forgot to that in the last release).