Google Analytics for WordPress by MonsterInsights - Version 1.4

Version Description

Download this release

Release Info

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

Code changes from version 1.2.1 to 1.4

Files changed (2) hide show
  1. gapp/googleanalytics.php +14 -12
  2. readme.txt +2 -1
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: 1.2.1
8
  Author URI: http://www.joostdevalk.nl/
9
  License: GPL
10
 
@@ -367,8 +367,8 @@ if ( ! class_exists( 'GA_Filter' ) ) {
367
  $opt = get_option('GoogleAnalyticsPP');
368
  $options = unserialize($opt);
369
 
370
- static $anchorPattern = '(.*href\s*=\s*)[\"\']*(.*)[\"\'] (.*)';
371
- ereg($anchorPattern, $text, $matches);
372
  if ($matches[2] == "") return $text;
373
 
374
  $target = GA_Filter::ga_get_domain($matches[2]);
@@ -385,15 +385,17 @@ if ( ! class_exists( 'GA_Filter' ) ) {
385
  }
386
 
387
  function bookmarks($bookmarks) {
388
- $opt = get_option('GoogleAnalyticsPP');
389
- $options = unserialize($opt);
390
-
391
- foreach ( (array) $bookmarks as $bookmark ) {
392
- if ($options['domainorurl'] == "domain") {
393
- $target = GA_Filter::ga_get_domain($bookmark->link_url);
394
- $bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:urchinTracker('".$options['blogrollprefix']."/".$target["host"]."');\"";
395
- } else if ($options['domainorurl'] == "url") {
396
- $bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:urchinTracker('".$options['blogrollprefix']."/".$bookmark->link_url."');\"";
 
 
397
  }
398
  }
399
  return $bookmarks;
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: 1.4
8
  Author URI: http://www.joostdevalk.nl/
9
  License: GPL
10
 
367
  $opt = get_option('GoogleAnalyticsPP');
368
  $options = unserialize($opt);
369
 
370
+ static $anchorPattern = '/(.*\s+.*?href\s*=\s*)["\'](.*?)["\'](.*)/';
371
+ preg_match($anchorPattern, $text, $matches);
372
  if ($matches[2] == "") return $text;
373
 
374
  $target = GA_Filter::ga_get_domain($matches[2]);
385
  }
386
 
387
  function bookmarks($bookmarks) {
388
+ if (!is_admin()) {
389
+ $opt = get_option('GoogleAnalyticsPP');
390
+ $options = unserialize($opt);
391
+
392
+ foreach ( (array) $bookmarks as $bookmark ) {
393
+ if ($options['domainorurl'] == "domain") {
394
+ $target = GA_Filter::ga_get_domain($bookmark->link_url);
395
+ $bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:urchinTracker('".$options['blogrollprefix']."/".$target["host"]."');\"";
396
+ } else if ($options['domainorurl'] == "url") {
397
+ $bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:urchinTracker('".$options['blogrollprefix']."/".$bookmark->link_url."');\"";
398
+ }
399
  }
400
  }
401
  return $bookmarks;
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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
7
- Stable tag: 1.2.1
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 add extra search engines, track image search queries and it will even work together with Urchin.
10
 
@@ -16,6 +16,7 @@ In the options panel for the plugin, you can determine the prefixes to use for t
16
 
17
  * [Google Analytics for WordPress](http://www.joostdevalk.nl/wordpress/google-analytics/).
18
  * Other [Wordpress plugins](http://www.joostdevalk.nl/wordpress/) by the same author.
 
19
 
20
  == Installation ==
21
 
4
  Tags: analytics, google analytics, statistics
5
  Requires at least: 2.2
6
  Tested up to: 2.3
7
+ Stable tag: 1.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 add extra search engines, track image search queries and it will even work together with Urchin.
10
 
16
 
17
  * [Google Analytics for WordPress](http://www.joostdevalk.nl/wordpress/google-analytics/).
18
  * Other [Wordpress plugins](http://www.joostdevalk.nl/wordpress/) by the same author.
19
+ * You can hire this author to write [WordPress themes](http://www.altha.co.uk/wordpress/themes/) and [plugins](http://www.altha.co.uk/wordpress/plugins/)!
20
 
21
  == Installation ==
22