Google Analytics for WordPress by MonsterInsights - Version 2.4

Version Description

Download this release

Release Info

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

Code changes from version 2.3 to 2.4

Files changed (2) hide show
  1. gapp/googleanalytics.php +8 -8
  2. readme.txt +2 -2
gapp/googleanalytics.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Analytics for WordPress
4
  Plugin URI: http://www.joostdevalk.nl/wordpress/analytics/
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: 2.3
8
  Author URI: http://www.joostdevalk.nl/
9
  License: GPL
10
 
@@ -325,14 +325,14 @@ if ( ! class_exists( 'GA_Filter' ) ) {
325
  $dlextensions = split(",",$options['dlextensions']);
326
  if ( $target["domain"] != $origin["domain"] ){
327
  if ($options['domainorurl'] == "domain") {
328
- $coolBit .= "onclick=\"javascript:pageTracker._trackVisit('".$leaf."/".$target["host"]."');\"";
329
  } else if ($options['domainorurl'] == "url") {
330
- $coolBit .= "onclick=\"javascript:pageTracker._trackVisit('".$leaf."/".$matches[2]."//".$matches[3]."');\"";
331
  }
332
  } else if ( in_array($extension, $dlextensions) && $target["domain"] == $origin["domain"] ) {
333
  $file = str_replace($origin["domain"],"",$matches[3]);
334
  $file = str_replace('www.',"",$file);
335
- $coolBit .= "onclick=\"javascript:pageTracker._trackVisit('".$options['dlprefix'].$file."');\"";
336
  }
337
  return '<a href="' . $matches[2] . '//' . $matches[3] . '"' . $matches[1] . $matches[4] . ' '.$coolBit.'>' . $matches[5] . '</a>';
338
  }
@@ -379,9 +379,9 @@ if ( ! class_exists( 'GA_Filter' ) ) {
379
  $origin = GA_Filter::ga_get_domain($_SERVER["HTTP_HOST"]);
380
  if ( $target["domain"] != $origin["domain"] ){
381
  if ($options['domainorurl'] == "domain") {
382
- $coolBit .= "onclick=\"javascript:pageTracker._trackVisit('".$options['comautprefix']."/".$target["host"]."');\"";
383
  } else if ($options['domainorurl'] == "url") {
384
- $coolBit .= "onclick=\"javascript:pageTracker._trackVisit('".$options['comautprefix']."/".$matches[2]."');\"";
385
  }
386
  }
387
  return $matches[1] . "\"" . $matches[2] . "\" " . $coolBit ." ". $matches[3];
@@ -398,9 +398,9 @@ if ( ! class_exists( 'GA_Filter' ) ) {
398
  foreach ( (array) $bookmarks as $bookmark ) {
399
  if ($options['domainorurl'] == "domain") {
400
  $target = GA_Filter::ga_get_domain($bookmark->link_url);
401
- $bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:pageTracker._trackVisit('".$options['blogrollprefix']."/".$target["host"]."');\"";
402
  } else if ($options['domainorurl'] == "url") {
403
- $bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:pageTracker._trackVisit('".$options['blogrollprefix']."/".$bookmark->link_url."');\"";
404
  }
405
  }
406
  }
4
  Plugin URI: http://www.joostdevalk.nl/wordpress/analytics/
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: 2.4
8
  Author URI: http://www.joostdevalk.nl/
9
  License: GPL
10
 
325
  $dlextensions = split(",",$options['dlextensions']);
326
  if ( $target["domain"] != $origin["domain"] ){
327
  if ($options['domainorurl'] == "domain") {
328
+ $coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$leaf."/".$target["host"]."');\"";
329
  } else if ($options['domainorurl'] == "url") {
330
+ $coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$leaf."/".$matches[2]."//".$matches[3]."');\"";
331
  }
332
  } else if ( in_array($extension, $dlextensions) && $target["domain"] == $origin["domain"] ) {
333
  $file = str_replace($origin["domain"],"",$matches[3]);
334
  $file = str_replace('www.',"",$file);
335
+ $coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$options['dlprefix'].$file."');\"";
336
  }
337
  return '<a href="' . $matches[2] . '//' . $matches[3] . '"' . $matches[1] . $matches[4] . ' '.$coolBit.'>' . $matches[5] . '</a>';
338
  }
379
  $origin = GA_Filter::ga_get_domain($_SERVER["HTTP_HOST"]);
380
  if ( $target["domain"] != $origin["domain"] ){
381
  if ($options['domainorurl'] == "domain") {
382
+ $coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$options['comautprefix']."/".$target["host"]."');\"";
383
  } else if ($options['domainorurl'] == "url") {
384
+ $coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$options['comautprefix']."/".$matches[2]."');\"";
385
  }
386
  }
387
  return $matches[1] . "\"" . $matches[2] . "\" " . $coolBit ." ". $matches[3];
398
  foreach ( (array) $bookmarks as $bookmark ) {
399
  if ($options['domainorurl'] == "domain") {
400
  $target = GA_Filter::ga_get_domain($bookmark->link_url);
401
+ $bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:pageTracker._trackPageview('".$options['blogrollprefix']."/".$target["host"]."');";
402
  } else if ($options['domainorurl'] == "url") {
403
+ $bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:pageTracker._trackPageview('".$options['blogrollprefix']."/".$bookmark->link_url."');";
404
  }
405
  }
406
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: joostdevalk
3
  Donate link: http://www.joostdevalk.nl/donate/
4
  Tags: analytics, google analytics, statistics
5
  Requires at least: 2.2
6
- Tested up to: 2.3.1
7
- Stable tag: 2.2
8
 
9
  The Google Analytics for WordPress plugina 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
 
3
  Donate link: http://www.joostdevalk.nl/donate/
4
  Tags: analytics, google analytics, statistics
5
  Requires at least: 2.2
6
+ Tested up to: 2.3.2
7
+ Stable tag: 2.4
8
 
9
  The Google Analytics for WordPress plugina 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