Version Description
- Bugs fixed in this release:
- Changed access level from "edit_users" to "manage_options" so super-admins in an multi site environment would be able to access.
- Not a real bug but a fix nonetheless: UA ID is now trimmed on output, so spaces accidently entered in the settings screen won't prevent tracking.
- Changed double quotes in link tracking output to single quotes to resolve incompatibilities with several plugins.
Download this release
Release Info
Developer | joostdevalk |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 4.0.7 |
Comparing to | |
See all releases |
Code changes from version 4.0.6 to 4.0.7
- googleanalytics.php +12 -11
- images/favicon.ico +0 -0
- images/ga-icon-32x32.png +0 -0
- images/ga-logo-532.png +0 -0
- readme.txt +9 -1
- yst_plugin_tools.css +2 -2
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 to your WordPress blog, adding lots of features, eg. custom variables and automatic clickout and download tracking.
|
6 |
Author: Joost de Valk
|
7 |
-
Version: 4.0.
|
8 |
Requires at least: 2.8
|
9 |
Author URI: http://yoast.com/
|
10 |
License: GPL
|
@@ -153,7 +153,8 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
153 |
}
|
154 |
});
|
155 |
});
|
156 |
-
|
|
|
157 |
<?php
|
158 |
}
|
159 |
}
|
@@ -252,7 +253,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
252 |
|
253 |
?>
|
254 |
<div class="wrap">
|
255 |
-
<a href="http://yoast.com/"><div id="yoast-icon" style="background: url(
|
256 |
<h2>Google Analytics for WordPress Configuration</h2>
|
257 |
<div class="postbox-container" style="width:65%;">
|
258 |
<div class="metabox-holder">
|
@@ -667,7 +668,7 @@ if ( ! class_exists( 'GA_Admin' ) ) {
|
|
667 |
if ( count($modules) > 0 )
|
668 |
$this->postbox('toc','List of Available Modules',$this->toc($modules));
|
669 |
$this->plugin_like();
|
670 |
-
$this->postbox('donate','<strong class="red">Donate $
|
671 |
<input type="hidden" name="cmd" value="_s-xclick">
|
672 |
<input type="hidden" name="hosted_button_id" value="FW9FK4EBZ9FVJ">
|
673 |
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
@@ -880,7 +881,7 @@ if ( ! class_exists( 'GA_Filter' ) ) {
|
|
880 |
<script type="text/javascript">//<![CDATA[
|
881 |
// Google Analytics for WordPress by Yoast v<?php echo $options['version']; ?> | http://yoast.com/wordpress/google-analytics/
|
882 |
var _gaq = _gaq || [];
|
883 |
-
_gaq.push(['_setAccount','<?php echo $options["uastring"]; ?>']);
|
884 |
<?php
|
885 |
if ( $options["extrase"] ) {
|
886 |
if ( !empty($options["extraseurl"]) ) {
|
@@ -911,7 +912,7 @@ if ( $options['gajslocalhosting'] && !empty($options['gajsurl']) ) {
|
|
911 |
<?php
|
912 |
} else if ( $options["uastring"] != "" ) {
|
913 |
echo "<!-- Google Analytics tracking code not shown because users over level ".$options["ignore_userlevel"]." are ignored -->\n";
|
914 |
-
} else if ( $options["uastring"] == "" && current_user_can('
|
915 |
echo "<!-- Google Analytics tracking code not shown because yo haven't chosen a Google Analytics account yet. -->\n";
|
916 |
}
|
917 |
}
|
@@ -1006,15 +1007,15 @@ if ( $options['gajslocalhosting'] && !empty($options['gajsurl']) ) {
|
|
1006 |
if (preg_match('/onclick=[\'\"](.*?)[\'\"]/i', $matches[4]) > 0) {
|
1007 |
// Check for manually tagged outbound clicks, and replace them with the tracking of choice.
|
1008 |
if (preg_match('/.*_track(Pageview|Event).*/i', $matches[4]) > 0) {
|
1009 |
-
$matches[4] = preg_replace('/onclick=[\'\"](javascript:)?(.*;)?[a-zA-Z0-9]+\._track(Pageview|Event)\([^\)]+\)(;)?(.*)?[\'\"]/i', 'onclick
|
1010 |
} else {
|
1011 |
-
$matches[4] = preg_replace('/onclick=[\'\"](javascript:)?(.*?)[\'\"]/i', 'onclick
|
1012 |
}
|
1013 |
} else {
|
1014 |
-
$matches[4] = 'onclick
|
1015 |
}
|
1016 |
}
|
1017 |
-
return '<a ' . $matches[1] . 'href
|
1018 |
}
|
1019 |
|
1020 |
function ga_parse_article_link($matches){
|
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=v407
|
5 |
Description: This plugin makes it simple to add Google Analytics to your WordPress blog, adding lots of features, eg. custom variables and automatic clickout and download tracking.
|
6 |
Author: Joost de Valk
|
7 |
+
Version: 4.0.7
|
8 |
Requires at least: 2.8
|
9 |
Author URI: http://yoast.com/
|
10 |
License: GPL
|
153 |
}
|
154 |
});
|
155 |
});
|
156 |
+
</script>
|
157 |
+
<link rel="shortcut icon" href="<?php echo plugin_dir_url(__FILE__); ?>/images/favicon.ico" />
|
158 |
<?php
|
159 |
}
|
160 |
}
|
253 |
|
254 |
?>
|
255 |
<div class="wrap">
|
256 |
+
<a href="http://yoast.com/"><div id="yoast-icon" style="background: url(<?php echo plugin_dir_url(__FILE__) ?>images/ga-icon-32x32.png) no-repeat;" class="icon32"><br /></div></a>
|
257 |
<h2>Google Analytics for WordPress Configuration</h2>
|
258 |
<div class="postbox-container" style="width:65%;">
|
259 |
<div class="metabox-holder">
|
668 |
if ( count($modules) > 0 )
|
669 |
$this->postbox('toc','List of Available Modules',$this->toc($modules));
|
670 |
$this->plugin_like();
|
671 |
+
$this->postbox('donate','<strong class="red">Donate $10, $20 or $50!</strong>','<p>This plugin has cost me countless hours of work, if you use it, please donate a token of your appreciation!</p><br/><form style="margin-left:50px;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
672 |
<input type="hidden" name="cmd" value="_s-xclick">
|
673 |
<input type="hidden" name="hosted_button_id" value="FW9FK4EBZ9FVJ">
|
674 |
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
881 |
<script type="text/javascript">//<![CDATA[
|
882 |
// Google Analytics for WordPress by Yoast v<?php echo $options['version']; ?> | http://yoast.com/wordpress/google-analytics/
|
883 |
var _gaq = _gaq || [];
|
884 |
+
_gaq.push(['_setAccount','<?php echo trim($options["uastring"]); ?>']);
|
885 |
<?php
|
886 |
if ( $options["extrase"] ) {
|
887 |
if ( !empty($options["extraseurl"]) ) {
|
912 |
<?php
|
913 |
} else if ( $options["uastring"] != "" ) {
|
914 |
echo "<!-- Google Analytics tracking code not shown because users over level ".$options["ignore_userlevel"]." are ignored -->\n";
|
915 |
+
} else if ( $options["uastring"] == "" && current_user_can('manage_options') ) {
|
916 |
echo "<!-- Google Analytics tracking code not shown because yo haven't chosen a Google Analytics account yet. -->\n";
|
917 |
}
|
918 |
}
|
1007 |
if (preg_match('/onclick=[\'\"](.*?)[\'\"]/i', $matches[4]) > 0) {
|
1008 |
// Check for manually tagged outbound clicks, and replace them with the tracking of choice.
|
1009 |
if (preg_match('/.*_track(Pageview|Event).*/i', $matches[4]) > 0) {
|
1010 |
+
$matches[4] = preg_replace('/onclick=[\'\"](javascript:)?(.*;)?[a-zA-Z0-9]+\._track(Pageview|Event)\([^\)]+\)(;)?(.*)?[\'\"]/i', 'onclick=\'javascript:' . $trackBit .'$2$5\'', $matches[4]);
|
1011 |
} else {
|
1012 |
+
$matches[4] = preg_replace('/onclick=[\'\"](javascript:)?(.*?)[\'\"]/i', 'onclick=\'javascript:' . $trackBit .'$2\'', $matches[4]);
|
1013 |
}
|
1014 |
} else {
|
1015 |
+
$matches[4] = 'onclick=\'javascript:' . $trackBit . '\'' . $matches[4];
|
1016 |
}
|
1017 |
}
|
1018 |
+
return '<a ' . $matches[1] . 'href=\'' . $matches[2] . '//' . $matches[3] . '\'' . ' ' . $matches[4] . '>' . $matches[5] . '</a>';
|
1019 |
}
|
1020 |
|
1021 |
function ga_parse_article_link($matches){
|
images/favicon.ico
ADDED
Binary file
|
images/ga-icon-32x32.png
ADDED
Binary file
|
images/ga-logo-532.png
ADDED
Binary file
|
readme.txt
CHANGED
@@ -4,12 +4,14 @@ 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 and with lots of metadata. 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 allow 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 |
|
11 |
== Description ==
|
12 |
|
|
|
|
|
13 |
The Google Analytics for WordPress plugin allows you to track your blog easily and with lots of metadata. 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 allow 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!
|
14 |
|
15 |
For the full list of features, check out the [Google Analytics for WordPress](http://yoast.com/wordpress/google-analytics/) homepage.
|
@@ -30,6 +32,12 @@ This section describes how to install the plugin and get it working.
|
|
30 |
|
31 |
== Changelog ==
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
= 4.0.6 =
|
34 |
* Bugs fixed in this release:
|
35 |
* Sanitizing relative URL's could go wrong on some blogs installed in subdirectories.
|
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.7
|
8 |
|
9 |
The Google Analytics for WordPress plugin allows you to track your blog easily and with lots of metadata. 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 allow 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 |
|
11 |
== Description ==
|
12 |
|
13 |
+
![Google Analytics for WordPress](http://cdn.yoast.com/downloads/ga-logo-532.png)
|
14 |
+
|
15 |
The Google Analytics for WordPress plugin allows you to track your blog easily and with lots of metadata. 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 allow 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!
|
16 |
|
17 |
For the full list of features, check out the [Google Analytics for WordPress](http://yoast.com/wordpress/google-analytics/) homepage.
|
32 |
|
33 |
== Changelog ==
|
34 |
|
35 |
+
= 4.0.7 =
|
36 |
+
* Bugs fixed in this release:
|
37 |
+
* Changed access level from "edit_users" to "manage_options" so super-admins in an multi site environment would be able to access.
|
38 |
+
* Not a real bug but a fix nonetheless: UA ID is now trimmed on output, so spaces accidently entered in the settings screen won't prevent tracking.
|
39 |
+
* Changed double quotes in link tracking output to single quotes to resolve incompatibilities with several plugins.
|
40 |
+
|
41 |
= 4.0.6 =
|
42 |
* Bugs fixed in this release:
|
43 |
* Sanitizing relative URL's could go wrong on some blogs installed in subdirectories.
|
yst_plugin_tools.css
CHANGED
@@ -71,11 +71,11 @@ div.inside .button:hover, div.inside .button-primary:hover {
|
|
71 |
}
|
72 |
|
73 |
.postbox#donate {
|
74 |
-
border-color:
|
75 |
border-width: 2px;
|
76 |
}
|
77 |
strong.red {
|
78 |
-
color:
|
79 |
font-weight: bold;
|
80 |
font-size: 105%;
|
81 |
}
|
71 |
}
|
72 |
|
73 |
.postbox#donate {
|
74 |
+
border-color: green;
|
75 |
border-width: 2px;
|
76 |
}
|
77 |
strong.red {
|
78 |
+
color: green;
|
79 |
font-weight: bold;
|
80 |
font-size: 105%;
|
81 |
}
|