Version Description
- Removed the optional anonymous statistics collection. Nothing is ever collected anymore.
- Changed & to & in some more places to fix validation problems.
Download this release
Release Info
Developer | aaroncampbell |
Plugin | WP Google Analytics |
Version | 1.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.4
- readme.txt +37 -2
- wp-google-analytics.php +5 -91
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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¤cy_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.
|
7 |
-
Stable tag: 1.2.
|
8 |
|
9 |
Lets you use <a href="http://analytics.google.com">Google Analytics</a> to track your WordPress site statistics
|
10 |
|
@@ -38,3 +38,38 @@ Absolutely, however in order to get a better idea of what is going on with your
|
|
38 |
site, it is often nice to have your own activities ignored, track 404s, searches
|
39 |
and even where users go when they leave your site. WP Google Analytics lets you
|
40 |
easily do all these things.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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¤cy_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 |
|
38 |
site, it is often nice to have your own activities ignored, track 404s, searches
|
39 |
and even where users go when they leave your site. WP Google Analytics lets you
|
40 |
easily do all these things.
|
41 |
+
|
42 |
+
|
43 |
+
== Changelog ==
|
44 |
+
|
45 |
+
= 1.2.4 =
|
46 |
+
* Removed the optional anonymous statistics collection. Nothing is ever collected anymore.
|
47 |
+
* Changed & to & in some more places to fix validation problems.
|
48 |
+
|
49 |
+
= 1.2.3 =
|
50 |
+
* Changed & to & to fix validation problems.
|
51 |
+
|
52 |
+
= 1.2.2 =
|
53 |
+
* Fixed problem with code affecting Admin Javascript such as the TinyMCE editor
|
54 |
+
|
55 |
+
= 1.2.1 =
|
56 |
+
* Bug fix for the stats gathering
|
57 |
+
|
58 |
+
= 1.2.0 =
|
59 |
+
* No longer parses outgoing links in the admin section.
|
60 |
+
* Uses get_footer instead of wp_footer. Too many themes aren't adding the wp_footer call.
|
61 |
+
* Options page updated
|
62 |
+
* Added optional anonymous statistics collection
|
63 |
+
|
64 |
+
= 1.1.0 =
|
65 |
+
* Major revamp to work better with the new Google Tracking Code. It seems that outgoing links weren't being tracked properly.
|
66 |
+
|
67 |
+
= 1.0.0 =
|
68 |
+
* Added to wordpress.org repository
|
69 |
+
|
70 |
+
= 0.2 =
|
71 |
+
* Fixed problem with themes that do not call wp_footer(). If you are reading this and you are a theme developer, USE THE HOOKS! That's what they're there for!
|
72 |
+
* Updated how the admin section is handled
|
73 |
+
|
74 |
+
= 0.1 =
|
75 |
+
* Original Version
|
wp-google-analytics.php
CHANGED
@@ -3,42 +3,12 @@
|
|
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.
|
7 |
* Author: Aaron D. Campbell
|
8 |
* Author URI: http://xavisys.com/
|
9 |
*/
|
10 |
|
11 |
-
define('WGA_VERSION', '1.2.
|
12 |
-
/**
|
13 |
-
* Changelog:
|
14 |
-
* 06/11/2008: 1.2.3
|
15 |
-
* - Changed & to & to fix validation problems.
|
16 |
-
*
|
17 |
-
* 06/11/2008: 1.2.2
|
18 |
-
* - Fixed problem with code affecting Admin Javascript such as the TinyMCE editor
|
19 |
-
*
|
20 |
-
* 06/08/2008: 1.2.1
|
21 |
-
* - Bug fix for the stats gathering
|
22 |
-
*
|
23 |
-
* 06/08/2008: 1.2.0
|
24 |
-
* - No longer parses outgoing links in the admin section.
|
25 |
-
* - Uses get_footer instead of wp_footer. Too many themes aren't adding the wp_footer call.
|
26 |
-
* - Options page updated
|
27 |
-
* - Added optional anonymous statistics collection
|
28 |
-
*
|
29 |
-
* 04/26/2008: 1.1.0
|
30 |
-
* - Major revamp to work better with the new Google Tracking Code. It seems that outgoing links weren't being tracked properly.
|
31 |
-
*
|
32 |
-
* 04/17/2008: 1.0.0
|
33 |
-
* - Added to wordpress.org repository
|
34 |
-
*
|
35 |
-
* 07/03/2007: 0.2
|
36 |
-
* - Fixed problem with themes that do not call wp_footer(). If you are reading this and you are a theme developer, USE THE HOOKS! That's what they're there for!
|
37 |
-
* - Updated how the admin section is handled
|
38 |
-
*
|
39 |
-
* 02/21/2007: 0.1
|
40 |
-
* - Original Version
|
41 |
-
*/
|
42 |
|
43 |
/* Copyright 2006 Aaron D. Campbell (email : wp_plugins@xavisys.com)
|
44 |
|
@@ -182,7 +152,7 @@ class wpGoogleAnalytics {
|
|
182 |
$track[$k] = trim($track[$k], '_');
|
183 |
}
|
184 |
$char = (strpos($track['data'], '?') === false)? '?':'&';
|
185 |
-
return str_replace("'", "\'", "/{$track['code']}/{$track['data']}{$char}referer=
|
186 |
}
|
187 |
|
188 |
/**
|
@@ -234,6 +204,7 @@ class wpGoogleAnalytics {
|
|
234 |
$track['url'] = wpGoogleAnalytics::get_url($track);
|
235 |
|
236 |
//adjust the code that we output, account for both types of tracking
|
|
|
237 |
$wga['code'] = str_replace("urchinTracker()","urchinTracker('{$track['url']}')", $wga['code']);
|
238 |
$wga['code'] = str_replace("pageTracker._trackPageview()","pageTracker._trackPageview('{$track['url']}')", $wga['code']);
|
239 |
|
@@ -371,67 +342,11 @@ class wpGoogleAnalytics {
|
|
371 |
function activatePlugin() {
|
372 |
// If the wga-id has not been generated, generate one and store it.
|
373 |
$o = get_option('wga');
|
374 |
-
$wgaId = wpGoogleAnalytics::get_wgaId();
|
375 |
if (!isset($o['user_agreed_to_send_system_information'])) {
|
376 |
$o['user_agreed_to_send_system_information'] = 'true';
|
377 |
update_option('wga', $o);
|
378 |
}
|
379 |
}
|
380 |
-
|
381 |
-
function get_wgaId() {
|
382 |
-
$wgaId = get_option('wga-id');
|
383 |
-
if ($wgaId === false) {
|
384 |
-
$wgaId = sha1( get_bloginfo('url') . mt_rand() );
|
385 |
-
update_option('wga-id', $wgaId);
|
386 |
-
}
|
387 |
-
return $wgaId;
|
388 |
-
}
|
389 |
-
/**
|
390 |
-
* if user agrees to send system information and the last sent info is outdated outputs a bunch of stuff that sends sysinfo without interrupting
|
391 |
-
*/
|
392 |
-
function outputSendInfoForm()
|
393 |
-
{
|
394 |
-
$o = get_option('wga');
|
395 |
-
if ($o['user_agreed_to_send_system_information'] == 'true') {
|
396 |
-
$lastSent = get_option('wga-sysinfo');
|
397 |
-
$sysinfo = wpGoogleAnalytics::get_sysinfo();
|
398 |
-
if (serialize($lastSent) != serialize($sysinfo)) {
|
399 |
-
?>
|
400 |
-
<iframe id="hidden_frame" name="hidden_frame" style="width:0px; height:0px; border: 0px" src="about:blank"></iframe>
|
401 |
-
<form id="wga_send_info_form" target="hidden_frame" method="post" action="http://xavisys.com/plugin-info.php">
|
402 |
-
<?php
|
403 |
-
foreach($sysinfo as $k=>$v)
|
404 |
-
{
|
405 |
-
?>
|
406 |
-
<input type="hidden" name="<?php echo attribute_escape($k); ?>" value="<?php echo attribute_escape($v);?>"></input>
|
407 |
-
<?php
|
408 |
-
}
|
409 |
-
?>
|
410 |
-
</form>
|
411 |
-
<script type='text/javascript'>
|
412 |
-
jQuery('#wga_send_info_form').submit();
|
413 |
-
</script>
|
414 |
-
<?php
|
415 |
-
update_option('wga-sysinfo', $sysinfo);
|
416 |
-
}
|
417 |
-
}
|
418 |
-
}
|
419 |
-
function get_sysinfo()
|
420 |
-
{
|
421 |
-
global $wpdb;
|
422 |
-
$s = array();
|
423 |
-
$s['plugin'] = 'WP Google Analytics';
|
424 |
-
$s['id'] = wpGoogleAnalytics::get_wgaId();
|
425 |
-
$s['version'] = WGA_VERSION;
|
426 |
-
|
427 |
-
$s['php_version'] = phpversion();
|
428 |
-
$s['mysql_version'] = @mysql_get_server_info($wpdb->dbh);
|
429 |
-
$s['server_software'] = $_SERVER["SERVER_SOFTWARE"];
|
430 |
-
$s['memory_limit'] = ini_get('memory_limit');
|
431 |
-
|
432 |
-
return $s;
|
433 |
-
}
|
434 |
-
|
435 |
}
|
436 |
|
437 |
/**
|
@@ -442,5 +357,4 @@ add_action('get_footer', array('wpGoogleAnalytics', 'insert_code'));
|
|
442 |
add_action('init', array('wpGoogleAnalytics', 'start_ob'));
|
443 |
add_action('update_option_wga-roles', array('wpGoogleAnalytics', 'updateOption'), null, 2);
|
444 |
add_action('activate_wp-google-analytics/wp-google-analytics.php', array('wpGoogleAnalytics', 'activatePlugin'));
|
445 |
-
|
446 |
-
?>
|
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 |
|
152 |
$track[$k] = trim($track[$k], '_');
|
153 |
}
|
154 |
$char = (strpos($track['data'], '?') === false)? '?':'&';
|
155 |
+
return str_replace("'", "\'", "/{$track['code']}/{$track['data']}{$char}referer=" . urlencode($_SERVER['HTTP_REFERER']));
|
156 |
}
|
157 |
|
158 |
/**
|
204 |
$track['url'] = wpGoogleAnalytics::get_url($track);
|
205 |
|
206 |
//adjust the code that we output, account for both types of tracking
|
207 |
+
$track['url'] = str_replace('&', '&', $track['url']);
|
208 |
$wga['code'] = str_replace("urchinTracker()","urchinTracker('{$track['url']}')", $wga['code']);
|
209 |
$wga['code'] = str_replace("pageTracker._trackPageview()","pageTracker._trackPageview('{$track['url']}')", $wga['code']);
|
210 |
|
342 |
function activatePlugin() {
|
343 |
// If the wga-id has not been generated, generate one and store it.
|
344 |
$o = get_option('wga');
|
|
|
345 |
if (!isset($o['user_agreed_to_send_system_information'])) {
|
346 |
$o['user_agreed_to_send_system_information'] = 'true';
|
347 |
update_option('wga', $o);
|
348 |
}
|
349 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
}
|
351 |
|
352 |
/**
|
357 |
add_action('init', array('wpGoogleAnalytics', 'start_ob'));
|
358 |
add_action('update_option_wga-roles', array('wpGoogleAnalytics', 'updateOption'), null, 2);
|
359 |
add_action('activate_wp-google-analytics/wp-google-analytics.php', array('wpGoogleAnalytics', 'activatePlugin'));
|
360 |
+
?>
|
|