Version Description
- Fix for stupid boolean mistake in 4.0.3
Download this release
Release Info
Developer | joostdevalk |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 4.0.4 |
Comparing to | |
See all releases |
Code changes from version 4.0.3 to 4.0.4
- googleanalytics.php +11 -11
- readme.txt +4 -1
googleanalytics.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
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&utm_content=
|
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: 4.0.
|
8 |
Requires at least: 2.8
|
9 |
Author URI: http://yoast.com/
|
10 |
License: GPL
|
@@ -202,13 +202,13 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
202 |
|
203 |
function upgrade() {
|
204 |
$options = get_option($this->optionname);
|
205 |
-
if ($options['version']
|
206 |
if ( !isset($options['trackcommentform']) || $options['trackcommentform'] == '')
|
207 |
$options['trackcommentform'] = true;
|
208 |
if ( !isset($options['ignore_userlevel']) || $options['ignore_userlevel'] == '')
|
209 |
$options['ignore_userlevel'] = 11;
|
210 |
|
211 |
-
$options['version'] = '4.0.
|
212 |
}
|
213 |
update_option($this->optionname, $options);
|
214 |
}
|
@@ -715,7 +715,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
715 |
* The order of custom variables is very, very important: custom vars should always take up the same slot to make analysis easy.
|
716 |
*/
|
717 |
$customvarslot = 1;
|
718 |
-
if ( $options["uastring"] != "" && !(
|
719 |
$push = array();
|
720 |
|
721 |
if ( $options['allowanchor'] )
|
@@ -872,7 +872,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
872 |
*/
|
873 |
function spool_adsense() {
|
874 |
$options = get_option('Yoast_Google_Analytics');
|
875 |
-
if ( $options["uastring"] != "" && !(
|
876 |
echo '<script type="text/javascript">'."\n";
|
877 |
echo "\t".'window.google_analytics_uacct = "'.$options["uastring"].'";'."\n";
|
878 |
echo '</script>'."\n";
|
@@ -983,7 +983,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
983 |
function widget_content($text) {
|
984 |
global $current_user;
|
985 |
$options = get_option('Yoast_Google_Analytics');
|
986 |
-
if (
|
987 |
return $text;
|
988 |
static $anchorPattern = '/<a (.*?)href=[\'\"](.*?)\/\/([^\'\"]+?)[\'\"](.*?)>(.*?)<\/a>/i';
|
989 |
$text = preg_replace_callback($anchorPattern,array('GA_Filter','ga_parse_widget_link'),$text);
|
@@ -993,7 +993,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
993 |
function the_content($text) {
|
994 |
global $current_user;
|
995 |
$options = get_option('Yoast_Google_Analytics');
|
996 |
-
if (
|
997 |
return $text;
|
998 |
|
999 |
if (!is_feed()) {
|
@@ -1006,7 +1006,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
1006 |
function comment_text($text) {
|
1007 |
global $current_user;
|
1008 |
$options = get_option('Yoast_Google_Analytics');
|
1009 |
-
if (
|
1010 |
return $text;
|
1011 |
|
1012 |
if (!is_feed()) {
|
@@ -1019,7 +1019,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
1019 |
function comment_author_link($text) {
|
1020 |
global $current_user;
|
1021 |
$options = get_option('Yoast_Google_Analytics');
|
1022 |
-
if (
|
1023 |
return $text;
|
1024 |
|
1025 |
static $anchorPattern = '/(.*\s+.*?href\s*=\s*)["\'](.*?)["\'](.*)/';
|
@@ -1041,7 +1041,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
1041 |
function bookmarks($bookmarks) {
|
1042 |
global $current_user;
|
1043 |
$options = get_option('Yoast_Google_Analytics');
|
1044 |
-
if (
|
1045 |
return $bookmarks;
|
1046 |
|
1047 |
$i = 0;
|
1 |
<?php
|
2 |
/*
|
3 |
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&utm_content=v40
|
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: 4.0.4
|
8 |
Requires at least: 2.8
|
9 |
Author URI: http://yoast.com/
|
10 |
License: GPL
|
202 |
|
203 |
function upgrade() {
|
204 |
$options = get_option($this->optionname);
|
205 |
+
if ($options['version'] != '4.0.4') {
|
206 |
if ( !isset($options['trackcommentform']) || $options['trackcommentform'] == '')
|
207 |
$options['trackcommentform'] = true;
|
208 |
if ( !isset($options['ignore_userlevel']) || $options['ignore_userlevel'] == '')
|
209 |
$options['ignore_userlevel'] = 11;
|
210 |
|
211 |
+
$options['version'] = '4.0.4';
|
212 |
}
|
213 |
update_option($this->optionname, $options);
|
214 |
}
|
715 |
* The order of custom variables is very, very important: custom vars should always take up the same slot to make analysis easy.
|
716 |
*/
|
717 |
$customvarslot = 1;
|
718 |
+
if ( $options["uastring"] != "" && !($current_user->user_level >= $options["ignore_userlevel"]) && !is_preview() ) {
|
719 |
$push = array();
|
720 |
|
721 |
if ( $options['allowanchor'] )
|
872 |
*/
|
873 |
function spool_adsense() {
|
874 |
$options = get_option('Yoast_Google_Analytics');
|
875 |
+
if ( $options["uastring"] != "" && !($current_user->user_level >= $options["ignore_userlevel"]) && !is_preview() ) {
|
876 |
echo '<script type="text/javascript">'."\n";
|
877 |
echo "\t".'window.google_analytics_uacct = "'.$options["uastring"].'";'."\n";
|
878 |
echo '</script>'."\n";
|
983 |
function widget_content($text) {
|
984 |
global $current_user;
|
985 |
$options = get_option('Yoast_Google_Analytics');
|
986 |
+
if ($current_user->user_level >= $options["ignore_userlevel"])
|
987 |
return $text;
|
988 |
static $anchorPattern = '/<a (.*?)href=[\'\"](.*?)\/\/([^\'\"]+?)[\'\"](.*?)>(.*?)<\/a>/i';
|
989 |
$text = preg_replace_callback($anchorPattern,array('GA_Filter','ga_parse_widget_link'),$text);
|
993 |
function the_content($text) {
|
994 |
global $current_user;
|
995 |
$options = get_option('Yoast_Google_Analytics');
|
996 |
+
if ($current_user->user_level >= $options["ignore_userlevel"])
|
997 |
return $text;
|
998 |
|
999 |
if (!is_feed()) {
|
1006 |
function comment_text($text) {
|
1007 |
global $current_user;
|
1008 |
$options = get_option('Yoast_Google_Analytics');
|
1009 |
+
if ($current_user->user_level >= $options["ignore_userlevel"])
|
1010 |
return $text;
|
1011 |
|
1012 |
if (!is_feed()) {
|
1019 |
function comment_author_link($text) {
|
1020 |
global $current_user;
|
1021 |
$options = get_option('Yoast_Google_Analytics');
|
1022 |
+
if ($current_user->user_level >= $options["ignore_userlevel"])
|
1023 |
return $text;
|
1024 |
|
1025 |
static $anchorPattern = '/(.*\s+.*?href\s*=\s*)["\'](.*?)["\'](.*)/';
|
1041 |
function bookmarks($bookmarks) {
|
1042 |
global $current_user;
|
1043 |
$options = get_option('Yoast_Google_Analytics');
|
1044 |
+
if ($current_user->user_level >= $options["ignore_userlevel"])
|
1045 |
return $bookmarks;
|
1046 |
|
1047 |
$i = 0;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://yoast.com/donate/
|
|
4 |
Tags: analytics, google analytics, statistics, tracking, stats, google
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.0
|
7 |
-
Stable tag: 4.0.
|
8 |
|
9 |
The Google Analytics for WordPress plugin allows you to track your blog easily. It adds the asynchronous tracking code for Google Analytics and automatically tracks and segments all outbound links from within posts, comment author links, links within comments, blogroll links and downloads. It'll add custom variables while tracking to show you pageviews per author, post type, category or publication year. It'll also allows you to track AdSense clicks, add extra search engines, ignore certain user levels, and much much more: this is simply the Ultimate Google Analytic solution for WP!
|
10 |
|
@@ -29,6 +29,9 @@ This section describes how to install the plugin and get it working.
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
|
|
|
|
|
|
32 |
= 4.0.3 =
|
33 |
* New features in this release:
|
34 |
* Added versioning to the options array, to allow for easy addition of options.
|
4 |
Tags: analytics, google analytics, statistics, tracking, stats, google
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.0
|
7 |
+
Stable tag: 4.0.4
|
8 |
|
9 |
The Google Analytics for WordPress plugin allows you to track your blog easily. It adds the asynchronous tracking code for Google Analytics and automatically tracks and segments all outbound links from within posts, comment author links, links within comments, blogroll links and downloads. It'll add custom variables while tracking to show you pageviews per author, post type, category or publication year. It'll also allows you to track AdSense clicks, add extra search engines, ignore certain user levels, and much much more: this is simply the Ultimate Google Analytic solution for WP!
|
10 |
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
= 4.0.4 =
|
33 |
+
* Fix for stupid boolean mistake in 4.0.3
|
34 |
+
|
35 |
= 4.0.3 =
|
36 |
* New features in this release:
|
37 |
* Added versioning to the options array, to allow for easy addition of options.
|