Google Analytics for WordPress by MonsterInsights - Version 4.2.6

Version Description

  • Fix to prevent far too agressive oAuth implementation from breaking other plugins.
Download this release

Release Info

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

Code changes from version 4.2.5 to 4.2.6

Files changed (2) hide show
  1. googleanalytics.php +6 -5
  2. readme.txt +5 -1
googleanalytics.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Analytics for WordPress
4
  Plugin URI: http://yoast.com/wordpress/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v420
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.2.5
8
  Requires at least: 3.0
9
  Author URI: http://yoast.com/
10
  License: GPL v3
@@ -34,13 +34,13 @@ define( 'GAWP_VERSION', '4.2.5' );
34
  * Admin User Interface
35
  */
36
 
37
- $options = get_option( 'Yoast_Google_Analytics' );
38
-
39
  if ( is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) && !class_exists( 'GA_Admin' ) ) {
40
 
41
  require_once plugin_dir_path( __FILE__ ) . 'yst_plugin_tools.php';
42
  require_once plugin_dir_path( __FILE__ ) . '/wp-gdata/wp-gdata.php';
43
 
 
 
44
  global $wp_version;
45
  if ( version_compare( $wp_version, '3.3', '>=' ) && !isset( $options['tracking_popup'] ) )
46
  require_once plugin_dir_path( __FILE__ ) . 'class-pointer.php';
@@ -875,7 +875,7 @@ if ( is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) && !class_exists(
875
 
876
 
877
  function authenticate() {
878
- if ( isset( $_REQUEST['oauth_token'] ) ) {
879
  $o = get_option( $this->optionname );
880
  if ( isset( $o['gawp_oauth']['oauth_token'] ) && $o['gawp_oauth']['oauth_token'] == $_REQUEST['oauth_token'] ) {
881
  $gdata = new WP_GData(
@@ -907,7 +907,8 @@ if ( is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) && !class_exists(
907
  )
908
  );
909
 
910
- $request_token = $gdata->get_request_token( menu_page_url( 'google-analytics-for-wordpress', false ) );
 
911
 
912
  $options = get_option( $this->optionname );
913
  unset( $options['ga_token'] );
4
  Plugin URI: http://yoast.com/wordpress/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v420
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.2.6
8
  Requires at least: 3.0
9
  Author URI: http://yoast.com/
10
  License: GPL v3
34
  * Admin User Interface
35
  */
36
 
 
 
37
  if ( is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) && !class_exists( 'GA_Admin' ) ) {
38
 
39
  require_once plugin_dir_path( __FILE__ ) . 'yst_plugin_tools.php';
40
  require_once plugin_dir_path( __FILE__ ) . '/wp-gdata/wp-gdata.php';
41
 
42
+ $options = get_option( 'Yoast_Google_Analytics' );
43
+
44
  global $wp_version;
45
  if ( version_compare( $wp_version, '3.3', '>=' ) && !isset( $options['tracking_popup'] ) )
46
  require_once plugin_dir_path( __FILE__ ) . 'class-pointer.php';
875
 
876
 
877
  function authenticate() {
878
+ if ( isset( $_REQUEST['ga_oauth_callback'] ) ) {
879
  $o = get_option( $this->optionname );
880
  if ( isset( $o['gawp_oauth']['oauth_token'] ) && $o['gawp_oauth']['oauth_token'] == $_REQUEST['oauth_token'] ) {
881
  $gdata = new WP_GData(
907
  )
908
  );
909
 
910
+ $oauth_callback = add_query_arg( array( 'ga_oauth_callback' => 1 ), menu_page_url( 'google-analytics-for-wordpress', false ) );
911
+ $request_token = $gdata->get_request_token( $oauth_callback );
912
 
913
  $options = get_option( $this->optionname );
914
  unset( $options['ga_token'] );
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.4
7
- Stable tag: 4.2.5
8
 
9
  Track your WordPress site easily and with lots of metadata: views per author & category, automatic tracking of outbound clicks and pageviews.
10
 
@@ -58,6 +58,10 @@ This section describes how to install the plugin and get it working.
58
 
59
  == Changelog ==
60
 
 
 
 
 
61
  = 4.2.5 =
62
 
63
  * Fixed a couple notices.
4
  Tags: analytics, google analytics, statistics, tracking, stats, google
5
  Requires at least: 2.8
6
  Tested up to: 3.4
7
+ Stable tag: 4.2.6
8
 
9
  Track your WordPress site easily and with lots of metadata: views per author & category, automatic tracking of outbound clicks and pageviews.
10
 
58
 
59
  == Changelog ==
60
 
61
+ = 4.2.6 =
62
+
63
+ * Fix to prevent far too agressive oAuth implementation from breaking other plugins.
64
+
65
  = 4.2.5 =
66
 
67
  * Fixed a couple notices.