Google Analytics for WordPress by MonsterInsights - Version 1.5

Version Description

Download this release

Release Info

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

Code changes from version 1.4 to 1.5

Files changed (2) hide show
  1. gapp/googleanalytics.php +14 -2
  2. readme.txt +5 -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.4
8
  Author URI: http://www.joostdevalk.nl/
9
  License: GPL
10
 
@@ -80,6 +80,12 @@ if ( ! class_exists( 'GA_Admin' ) ) {
80
  $options['yahooreffirst'] = false;
81
  }
82
 
 
 
 
 
 
 
83
  if (isset($_POST['userv2'])) {
84
  $options['userv2'] = true;
85
  } else {
@@ -186,6 +192,9 @@ if ( ! class_exists( 'GA_Admin' ) ) {
186
  <input type="checkbox" id="yahooreffirst" name="yahooreffirst" <?php if ($options['yahooreffirst']) echo ' checked="checked" '; ?>/>
187
  <label for="yahooreffirst">Track the keyword people used to search before they refined their search queries in Yahoo! (<a href="http://www.joostdevalk.nl/yahoos-search-assist-and-tracking-keywords/">more info</a>)</label><br/>
188
  <br/>
 
 
 
189
  <input type="checkbox" id="userv2" name="userv2" <?php if ($options['userv2']) echo ' checked="checked" '; ?>/>
190
  <label for="userv2">I use Urchin too, so add <code>_userv = 2;</code></label>
191
  </p>
@@ -263,7 +272,10 @@ if ( ! class_exists( 'GA_Filter' ) ) {
263
  $opt = get_option('GoogleAnalyticsPP');
264
  $options = unserialize($opt);
265
 
266
- if ($options["uastring"] != "") {
 
 
 
267
  echo("\n\t<!-- Google Analytics for WordPress | http://www.joostdevalk.nl/wordpress/google-analytics/ -->\n");
268
  echo("\t<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\"></script>\n");
269
  if ( $options["extrase"] == true ) {
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.5
8
  Author URI: http://www.joostdevalk.nl/
9
  License: GPL
10
 
80
  $options['yahooreffirst'] = false;
81
  }
82
 
83
+ if (isset($_POST['admintracking'])) {
84
+ $options['admintracking'] = true;
85
+ } else {
86
+ $options['admintracking'] = false;
87
+ }
88
+
89
  if (isset($_POST['userv2'])) {
90
  $options['userv2'] = true;
91
  } else {
192
  <input type="checkbox" id="yahooreffirst" name="yahooreffirst" <?php if ($options['yahooreffirst']) echo ' checked="checked" '; ?>/>
193
  <label for="yahooreffirst">Track the keyword people used to search before they refined their search queries in Yahoo! (<a href="http://www.joostdevalk.nl/yahoos-search-assist-and-tracking-keywords/">more info</a>)</label><br/>
194
  <br/>
195
+ <input type="checkbox" id="admintracking" name="admintracking" <?php if ($options['admintracking']) echo ' checked="checked" '; ?>/>
196
+ <label for="admintracking">Track the administrator too (default is not to)</label>
197
+ <br/>
198
  <input type="checkbox" id="userv2" name="userv2" <?php if ($options['userv2']) echo ' checked="checked" '; ?>/>
199
  <label for="userv2">I use Urchin too, so add <code>_userv = 2;</code></label>
200
  </p>
272
  $opt = get_option('GoogleAnalyticsPP');
273
  $options = unserialize($opt);
274
 
275
+ global $user_level;
276
+ get_currentuserinfo();
277
+
278
+ if ($options["uastring"] != "" && ($user_level != 10 || $options["admintracking"]) ) {
279
  echo("\n\t<!-- Google Analytics for WordPress | http://www.joostdevalk.nl/wordpress/google-analytics/ -->\n");
280
  echo("\t<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\"></script>\n");
281
  if ( $options["extrase"] == true ) {
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.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
 
@@ -26,6 +26,10 @@ This section describes how to install the plugin and get it working.
26
  1. Activate the plugin through the 'Plugins' menu in WordPress
27
  1. Go to the options panel under the 'Plugins' menu and add your Analytics account number and set the settings you want.
28
 
 
 
 
 
29
  == Frequently Asked Questions ==
30
 
31
  = This inflates my clicks, can I filter those out? =
4
  Tags: analytics, google analytics, statistics
5
  Requires at least: 2.2
6
  Tested up to: 2.3
7
+ Stable tag: 1.5
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
 
26
  1. Activate the plugin through the 'Plugins' menu in WordPress
27
  1. Go to the options panel under the 'Plugins' menu and add your Analytics account number and set the settings you want.
28
 
29
+ == Changelog ==
30
+
31
+ 1.5: added option to enable admin tracking, off by default
32
+
33
  == Frequently Asked Questions ==
34
 
35
  = This inflates my clicks, can I filter those out? =