Google Analytics for WordPress by MonsterInsights - Version 3.2.3

Version Description

  • Added 0 result search tracking inspired by Justin Cutroni's post.
Download this release

Release Info

Developer joostdevalk
Plugin Icon 128x128 Google Analytics for WordPress by MonsterInsights
Version 3.2.3
Comparing to
See all releases

Code changes from version 3.2.2 to 3.2.3

Files changed (2) hide show
  1. googleanalytics.php +8 -2
  2. readme.txt +5 -2
googleanalytics.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Analytics for WordPress
4
  Plugin URI: http://yoast.com/wordpress/analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=google-analytics-for-wordpress
5
  Description: This plugin makes it simple to add Google Analytics with extra search engines and automatic clickout and download tracking to your WordPress blog.
6
  Author: Joost de Valk
7
- Version: 3.2.2
8
  Requires at least: 2.7
9
  Author URI: http://yoast.com/
10
  License: GPL
@@ -336,7 +336,8 @@ if ( ! class_exists( 'GA_Filter' ) ) {
336
  /*
337
  * Insert the tracking code into the page
338
  */
339
- function spool_analytics() {
 
340
  $options = get_option('GoogleAnalyticsPP');
341
 
342
  if ( $options["uastring"] != "" && (!current_user_can('edit_users') || $options["admintracking"]) && !is_preview() ) {
@@ -357,6 +358,11 @@ if ( ! class_exists( 'GA_Filter' ) ) {
357
  echo "\t\t".'pageTracker._trackPageview("/404.html?page=" + document.location.pathname + document.location.search + "&from=" + document.referrer);'."\n";
358
  echo "\t".'} catch(err) {}'."\n";
359
  echo '</script>'."\n";
 
 
 
 
 
360
  } else {
361
  if ( $options["extrase"] ) {
362
  /**
4
  Plugin URI: http://yoast.com/wordpress/analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=google-analytics-for-wordpress
5
  Description: This plugin makes it simple to add Google Analytics with extra search engines and automatic clickout and download tracking to your WordPress blog.
6
  Author: Joost de Valk
7
+ Version: 3.2.3
8
  Requires at least: 2.7
9
  Author URI: http://yoast.com/
10
  License: GPL
336
  /*
337
  * Insert the tracking code into the page
338
  */
339
+ function spool_analytics() {
340
+ global $wp_query;
341
  $options = get_option('GoogleAnalyticsPP');
342
 
343
  if ( $options["uastring"] != "" && (!current_user_can('edit_users') || $options["admintracking"]) && !is_preview() ) {
358
  echo "\t\t".'pageTracker._trackPageview("/404.html?page=" + document.location.pathname + document.location.search + "&from=" + document.referrer);'."\n";
359
  echo "\t".'} catch(err) {}'."\n";
360
  echo '</script>'."\n";
361
+ } if ($wp_query->is_search && $wp->query->found_posts == 0) {
362
+ echo "\t".'try {'."\n";
363
+ echo "\t\t".'pageTracker._trackPageview("'.get_bloginfo('url').'/?s=no-results: '.$wp_query->query_vars['s'].'&cat=no-results");'."\n";
364
+ echo "\t".'} catch(err) {}'."\n";
365
+ echo '</script>'."\n";
366
  } else {
367
  if ( $options["extrase"] ) {
368
  /**
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: joostdevalk
3
  Donate link: http://yoast.com/donate/
4
  Tags: analytics, google analytics, statistics
5
  Requires at least: 2.7
6
- Tested up to: 2.8.3
7
- Stable tag: 3.2.2
8
 
9
  The Google Analytics for WordPress plugin automatically tracks and segments all outbound links from within posts, comment author links, links within comments, blogroll links and downloads. It also allows you to track AdSense clicks, add extra search engines, track image search queries and it will even work together with Urchin.
10
 
@@ -29,6 +29,9 @@ This section describes how to install the plugin and get it working.
29
 
30
  == Changelog ==
31
 
 
 
 
32
  = 3.2.2 =
33
  * Fix to the hashtag redirect so it actually works in all cases.
34
 
3
  Donate link: http://yoast.com/donate/
4
  Tags: analytics, google analytics, statistics
5
  Requires at least: 2.7
6
+ Tested up to: 2.8.4
7
+ Stable tag: 3.2.3
8
 
9
  The Google Analytics for WordPress plugin automatically tracks and segments all outbound links from within posts, comment author links, links within comments, blogroll links and downloads. It also allows you to track AdSense clicks, add extra search engines, track image search queries and it will even work together with Urchin.
10
 
29
 
30
  == Changelog ==
31
 
32
+ = 3.2.3 =
33
+ * Added 0 result search tracking inspired by [Justin Cutroni's post](http://www.epikone.com/blog/2009/09/08/tracking-ero-result-searches-in-google-analytics/).
34
+
35
  = 3.2.2 =
36
  * Fix to the hashtag redirect so it actually works in all cases.
37