WP Google Analytics - Version 1.2.5

Version Description

  • Fixed some notices. Props westi
  • Update all links
Download this release

Release Info

Developer aaroncampbell
Plugin Icon wp plugin WP Google Analytics
Version 1.2.5
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.5

Files changed (2) hide show
  1. readme.txt +8 -5
  2. wp-google-analytics.php +7 -21
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WP Google Analytics ===
2
  Contributors: aaroncampbell
3
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal%40xavisys%2ecom&item_name=Google%20Analytics%20Plugin&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
4
  Tags: analytics, google, google analytics
5
  Requires at least: 1.5
6
- Tested up to: 2.9
7
- Stable tag: 1.2.4
8
 
9
  Lets you use <a href="http://analytics.google.com">Google Analytics</a> to track your WordPress site statistics
10
 
@@ -21,8 +21,7 @@ your WordPress site statistics. It is easily configurable to:
21
 
22
  == Installation ==
23
 
24
- 1. Upload the `wp-google-analytics.php` file to the `/wp-content/plugins/` directory
25
- 1. Activate the plugin through the 'Plugins' menu in WordPress
26
 
27
  == Frequently Asked Questions ==
28
 
@@ -42,6 +41,10 @@ easily do all these things.
42
 
43
  == Changelog ==
44
 
 
 
 
 
45
  = 1.2.4 =
46
  * Removed the optional anonymous statistics collection. Nothing is ever collected anymore.
47
  * Changed & to &amp; in some more places to fix validation problems.
1
  === WP Google Analytics ===
2
  Contributors: aaroncampbell
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CLXNQ3DVK6M48
4
  Tags: analytics, google, google analytics
5
  Requires at least: 1.5
6
+ Tested up to: 3.5
7
+ Stable tag: 1.2.5
8
 
9
  Lets you use <a href="http://analytics.google.com">Google Analytics</a> to track your WordPress site statistics
10
 
21
 
22
  == Installation ==
23
 
24
+ Use automatic installer.
 
25
 
26
  == Frequently Asked Questions ==
27
 
41
 
42
  == Changelog ==
43
 
44
+ = 1.2.5 =
45
+ * Fixed some notices. Props westi
46
+ * Update all links
47
+
48
  = 1.2.4 =
49
  * Removed the optional anonymous statistics collection. Nothing is ever collected anymore.
50
  * Changed & to &amp; in some more places to fix validation problems.
wp-google-analytics.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /**
3
  * Plugin Name: WP Google Analytics
4
- * Plugin URI: http://xavisys.com/wordpress-google-analytics-plugin/
5
  * Description: Lets you use <a href="http://analytics.google.com">Google Analytics</a> to track your WordPress site statistics
6
- * Version: 1.2.4
7
  * Author: Aaron D. Campbell
8
- * Author URI: http://xavisys.com/
9
  */
10
 
11
- define('WGA_VERSION', '1.2.4');
12
 
13
  /* Copyright 2006 Aaron D. Campbell (email : wp_plugins@xavisys.com)
14
 
@@ -82,20 +82,6 @@ class wpGoogleAnalytics {
82
  <textarea name="wga[code]" id="wga_code" style="width:95%;" rows="10"><?php echo htmlentities($wga['code']); ?></textarea>
83
  </td>
84
  </tr>
85
- <tr valign="top">
86
- <th scope="row">
87
- <a title="<?php _e('Click for Help!'); ?>" href="#" onclick="jQuery('#wga_user_agreed_to_send_system_information_help').toggle(); return false;">
88
- <?php _e('System Information:') ?>
89
- </a>
90
- </th>
91
- <td>
92
- <label for="wga_user_agreed_to_send_system_information"><input type="checkbox" name="wga[user_agreed_to_send_system_information]" value="true" id="wga_user_agreed_to_send_system_information"<?php checked('true', $wga['user_agreed_to_send_system_information']); ?> /> <?php _e('I agree to send anonymous system information'); ?></label><br />
93
- <small id="wga_user_agreed_to_send_system_information_help" style="display:none;">
94
- <?php _e('You can help by sending anonymous system information that will help Xavisys make better decisions about new features.'); ?><br />
95
- <?php _e('The information will be sent anonymously, but a unique identifier will be sent to prevent duplicate entries from the same installation.'); ?>
96
- </small>
97
- </td>
98
- </tr>
99
  <tr valign="top">
100
  <th scope="row">
101
  <?php _e('Additional items to log:') ?>
@@ -133,7 +119,7 @@ class wpGoogleAnalytics {
133
  * @return string - Tracking URL
134
  */
135
  function get_url($track) {
136
- $site_url = (($_SERVER['HTTPS'] == 'on')? 'https://':'http://').$_SERVER['HTTP_HOST'];
137
  foreach ($track as $k=>$value) {
138
  if (strpos(strtolower($value), strtolower($site_url)) === 0) {
139
  $track[$k] = substr($track[$k], strlen($site_url));
@@ -152,7 +138,7 @@ class wpGoogleAnalytics {
152
  $track[$k] = trim($track[$k], '_');
153
  }
154
  $char = (strpos($track['data'], '?') === false)? '?':'&amp;';
155
- return str_replace("'", "\'", "/{$track['code']}/{$track['data']}{$char}referer=" . urlencode($_SERVER['HTTP_REFERER']));
156
  }
157
 
158
  /**
@@ -295,7 +281,7 @@ class wpGoogleAnalytics {
295
  function handle_link($m) {
296
  $code = wpGoogleAnalytics::get_options('code');
297
  //get our site url...used to see if the link is outgoing. We can't use the wordpress setting, because wordpress might not be running at the document root.
298
- $site_url = (($_SERVER['HTTPS'] == 'on')? 'https://':'http://').$_SERVER['HTTP_HOST'];
299
  $link = array_pop($m);
300
  //If the link is outgoing, we modify $m[0] (the anchor tag)
301
  if (preg_match("/^https?:\/\//i", $link) && (strpos(strtolower($link), strtolower($site_url)) !== 0 )) {
1
  <?php
2
  /**
3
  * Plugin Name: WP Google Analytics
4
+ * Plugin URI: http://bluedogwebservices.com/wordpress-plugin/wp-google-analytics/
5
  * Description: Lets you use <a href="http://analytics.google.com">Google Analytics</a> to track your WordPress site statistics
6
+ * Version: 1.2.5
7
  * Author: Aaron D. Campbell
8
+ * Author URI: http://ran.ge/
9
  */
10
 
11
+ define('WGA_VERSION', '1.2.5');
12
 
13
  /* Copyright 2006 Aaron D. Campbell (email : wp_plugins@xavisys.com)
14
 
82
  <textarea name="wga[code]" id="wga_code" style="width:95%;" rows="10"><?php echo htmlentities($wga['code']); ?></textarea>
83
  </td>
84
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  <tr valign="top">
86
  <th scope="row">
87
  <?php _e('Additional items to log:') ?>
119
  * @return string - Tracking URL
120
  */
121
  function get_url($track) {
122
+ $site_url = ( is_ssl() ? 'https://':'http://' ).$_SERVER['HTTP_HOST'];
123
  foreach ($track as $k=>$value) {
124
  if (strpos(strtolower($value), strtolower($site_url)) === 0) {
125
  $track[$k] = substr($track[$k], strlen($site_url));
138
  $track[$k] = trim($track[$k], '_');
139
  }
140
  $char = (strpos($track['data'], '?') === false)? '?':'&amp;';
141
+ return str_replace("'", "\'", "/{$track['code']}/{$track['data']}{$char}referer=" . urlencode( isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '' ) );
142
  }
143
 
144
  /**
281
  function handle_link($m) {
282
  $code = wpGoogleAnalytics::get_options('code');
283
  //get our site url...used to see if the link is outgoing. We can't use the wordpress setting, because wordpress might not be running at the document root.
284
+ $site_url = ( is_ssl() ? 'https://':'http://').$_SERVER['HTTP_HOST'];
285
  $link = array_pop($m);
286
  //If the link is outgoing, we modify $m[0] (the anchor tag)
287
  if (preg_match("/^https?:\/\//i", $link) && (strpos(strtolower($link), strtolower($site_url)) !== 0 )) {