Version Description
Fix for custom variables not being tracked
Download this release
Release Info
Developer | aaroncampbell |
Plugin | WP Google Analytics |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
- readme.txt +7 -1
- wp-google-analytics.php +17 -17
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: analytics, google, google analytics
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.5
|
7 |
-
Stable tag: 1.3.
|
8 |
|
9 |
Lets you use <a href="http://analytics.google.com">Google Analytics</a> to track your WordPress site statistics
|
10 |
|
@@ -49,11 +49,17 @@ easily do all these things.
|
|
49 |
|
50 |
== Upgrade Notice ==
|
51 |
|
|
|
|
|
|
|
52 |
= 1.3.0 =
|
53 |
Move to using events for tracking 404s and outgoing links and add support for custom variables
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
57 |
= 1.3.0 =
|
58 |
* Refactored to use settings API - Props danielbachhuber
|
59 |
* Convert to singleton and instatiate class
|
4 |
Tags: analytics, google, google analytics
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.5
|
7 |
+
Stable tag: 1.3.1
|
8 |
|
9 |
Lets you use <a href="http://analytics.google.com">Google Analytics</a> to track your WordPress site statistics
|
10 |
|
49 |
|
50 |
== Upgrade Notice ==
|
51 |
|
52 |
+
= 1.3.1 =
|
53 |
+
Fix for custom variables not being tracked
|
54 |
+
|
55 |
= 1.3.0 =
|
56 |
Move to using events for tracking 404s and outgoing links and add support for custom variables
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
= 1.3.1 =
|
61 |
+
* Fixed custom variables not being tracked
|
62 |
+
|
63 |
= 1.3.0 =
|
64 |
* Refactored to use settings API - Props danielbachhuber
|
65 |
* Convert to singleton and instatiate class
|
wp-google-analytics.php
CHANGED
@@ -3,14 +3,14 @@
|
|
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.3.
|
7 |
* Author: Aaron D. Campbell
|
8 |
* Author URI: http://ran.ge/
|
9 |
* License: GPLv2 or later
|
10 |
* Text Domain: wp-google-analytics
|
11 |
*/
|
12 |
|
13 |
-
define('WGA_VERSION', '1.3.
|
14 |
|
15 |
/* Copyright 2006 Aaron D. Campbell (email : wp_plugins@xavisys.com)
|
16 |
|
@@ -296,6 +296,21 @@ class wpGoogleAnalytics {
|
|
296 |
"_gaq.push(['_setAccount', '{$tracking_id}']);",
|
297 |
);
|
298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
$track = array();
|
300 |
if (is_404() && (!isset($wga['log_404s']) || $wga['log_404s'] != 'false')) {
|
301 |
// This is a 404 and we are supposed to track them
|
@@ -315,21 +330,6 @@ class wpGoogleAnalytics {
|
|
315 |
$custom_vars[] = "_gaq.push(['_trackPageview']);";
|
316 |
}
|
317 |
|
318 |
-
// Add custom variables specified by the user
|
319 |
-
foreach( $this->_get_options( 'custom_vars', array() ) as $i => $custom_var ) {
|
320 |
-
if ( empty( $custom_var['name'] ) || empty( $custom_var['value'] ) )
|
321 |
-
continue;
|
322 |
-
$atts = array(
|
323 |
-
"'_setCustomVar'",
|
324 |
-
intval( $i ),
|
325 |
-
"'" . esc_js( $custom_var['name'] ) . "'",
|
326 |
-
"'" . esc_js( $custom_var['value'] ) . "'",
|
327 |
-
);
|
328 |
-
if ( $custom_var['scope'] )
|
329 |
-
$atts[] = intval( $custom_var['scope'] );
|
330 |
-
$custom_vars[] = "_gaq.push([" . implode( ', ', $atts ) . "]);";
|
331 |
-
}
|
332 |
-
|
333 |
$async_code = "<script type='text/javascript'>
|
334 |
var _gaq = _gaq || [];
|
335 |
%custom_vars%
|
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.3.1
|
7 |
* Author: Aaron D. Campbell
|
8 |
* Author URI: http://ran.ge/
|
9 |
* License: GPLv2 or later
|
10 |
* Text Domain: wp-google-analytics
|
11 |
*/
|
12 |
|
13 |
+
define('WGA_VERSION', '1.3.1');
|
14 |
|
15 |
/* Copyright 2006 Aaron D. Campbell (email : wp_plugins@xavisys.com)
|
16 |
|
296 |
"_gaq.push(['_setAccount', '{$tracking_id}']);",
|
297 |
);
|
298 |
|
299 |
+
// Add custom variables specified by the user
|
300 |
+
foreach( $this->_get_options( 'custom_vars', array() ) as $i => $custom_var ) {
|
301 |
+
if ( empty( $custom_var['name'] ) || empty( $custom_var['value'] ) )
|
302 |
+
continue;
|
303 |
+
$atts = array(
|
304 |
+
"'_setCustomVar'",
|
305 |
+
intval( $i ),
|
306 |
+
"'" . esc_js( $custom_var['name'] ) . "'",
|
307 |
+
"'" . esc_js( $custom_var['value'] ) . "'",
|
308 |
+
);
|
309 |
+
if ( $custom_var['scope'] )
|
310 |
+
$atts[] = intval( $custom_var['scope'] );
|
311 |
+
$custom_vars[] = "_gaq.push([" . implode( ', ', $atts ) . "]);";
|
312 |
+
}
|
313 |
+
|
314 |
$track = array();
|
315 |
if (is_404() && (!isset($wga['log_404s']) || $wga['log_404s'] != 'false')) {
|
316 |
// This is a 404 and we are supposed to track them
|
330 |
$custom_vars[] = "_gaq.push(['_trackPageview']);";
|
331 |
}
|
332 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
$async_code = "<script type='text/javascript'>
|
334 |
var _gaq = _gaq || [];
|
335 |
%custom_vars%
|