Google Analytics - Version 3.1.3

Version Description

  • Test with WordPress 6.1.1.
Download this release

Release Info

Developer ShareThis
Plugin Icon wp plugin Google Analytics
Version 3.1.3
Comparing to
See all releases

Code changes from version 3.1.2 to 3.1.3

class/class-ga-admin.php CHANGED
@@ -648,7 +648,7 @@ class Ga_Admin {
648
  * Shows plugin's notice on the admin area.
649
  */
650
  public static function admin_notice_googleanalytics() {
651
- if ( ( ! get_option( self::GA_SHARETHIS_TERMS_OPTION_NAME ) && Ga_Helper::is_plugin_page() ) ||
652
  ( ! get_option( self::GA_SHARETHIS_TERMS_OPTION_NAME ) && ! get_option( self::GA_HIDE_TERMS_OPTION_NAME ) ) ) {
653
  $current_url = Ga_Helper::get_current_url();
654
  $url = ( strstr(
648
  * Shows plugin's notice on the admin area.
649
  */
650
  public static function admin_notice_googleanalytics() {
651
+ if ( ( ! get_option( self::GA_SHARETHIS_TERMS_OPTION_NAME ) && true === Ga_Helper::is_plugin_page() ) ||
652
  ( ! get_option( self::GA_SHARETHIS_TERMS_OPTION_NAME ) && ! get_option( self::GA_HIDE_TERMS_OPTION_NAME ) ) ) {
653
  $current_url = Ga_Helper::get_current_url();
654
  $url = ( strstr(
class/class-ga-helper.php CHANGED
@@ -60,12 +60,15 @@ class Ga_Helper {
60
  * @return integer
61
  */
62
  public static function is_plugin_page() {
63
- $site = get_current_screen();
 
 
64
 
65
- $request_uri = filter_input( INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL );
 
 
66
 
67
- return preg_match( '/' . GA_NAME . '/i', $site->base )
68
- || preg_match( '/' . GA_NAME . '/i', $request_uri );
69
  }
70
 
71
  /**
60
  * @return integer
61
  */
62
  public static function is_plugin_page() {
63
+ $page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING );
64
+
65
+ $page_split = explode( '/', $page );
66
 
67
+ if ( false === empty( $page_split ) && true === isset( $page_split[0] ) ) {
68
+ return GA_NAME === $page_split[0];
69
+ }
70
 
71
+ return false;
 
72
  }
73
 
74
  /**
googleanalytics.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ShareThis Dashboard for Google Analytics
4
  * Plugin URI: http://wordpress.org/extend/plugins/googleanalytics/
5
  * Description: Use Google Analytics on your WordPress site without touching any code, and view visitor reports right in your WordPress admin dashboard!
6
- * Version: 3.1.2
7
  * Author: ShareThis
8
  * Author URI: http://sharethis.com
9
  *
@@ -59,7 +59,7 @@ if ( false === preg_match( '/(\/|\\\)' . GA_NAME . '(\/|\\\)/', realpath( __FILE
59
  die();
60
  }
61
 
62
- const GOOGLEANALYTICS_VERSION = '3.1.2';
63
 
64
  // Requires.
65
  require_once GA_PLUGIN_DIR . '/lib/analytics-admin/vendor/autoload.php';
3
  * Plugin Name: ShareThis Dashboard for Google Analytics
4
  * Plugin URI: http://wordpress.org/extend/plugins/googleanalytics/
5
  * Description: Use Google Analytics on your WordPress site without touching any code, and view visitor reports right in your WordPress admin dashboard!
6
+ * Version: 3.1.3
7
  * Author: ShareThis
8
  * Author URI: http://sharethis.com
9
  *
59
  die();
60
  }
61
 
62
+ const GOOGLEANALYTICS_VERSION = '3.1.3';
63
 
64
  // Requires.
65
  require_once GA_PLUGIN_DIR . '/lib/analytics-admin/vendor/autoload.php';
js/googleanalytics_page.js CHANGED
@@ -812,37 +812,6 @@ const GA_AUTHENTICATION_CODE_ERROR = 'That looks like your Google Analytics Trac
812
  } else {
813
  checkbox.removeProp( 'checked' );
814
  }
815
-
816
- $( ".ga-slider-disable" ).on(
817
- "click",
818
- function( e ) {
819
- var manually_enter_not_checked = $( '#ga_enter_code_manually' ).not( ':checked' );
820
- if ( checkbox.not( ':checked' ).length > 0 ) {
821
- if ( confirm( 'This will disable Dashboards and Google API' ) ) {
822
- setTimeout(
823
- function() {
824
- window.location.href = GA_DISABLE_FEATURE_URL;
825
- },
826
- 350,
827
- );
828
- } else {
829
- setTimeout(
830
- function() {
831
- checkbox.removeProp( 'checked' );
832
- },
833
- 350,
834
- );
835
- }
836
- } else {
837
- setTimeout(
838
- function() {
839
- window.location.href = GA_ENABLE_FEATURE_URL;
840
- },
841
- 350,
842
- );
843
- }
844
- },
845
- );
846
  },
847
  };
848
 
812
  } else {
813
  checkbox.removeProp( 'checked' );
814
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
815
  },
816
  };
817
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: sharethis, scottstorebloom, scottmweaver
3
  Tags: analytics, google analytics, google analytics plugin, google analytics widget, google analytics dashboard
4
  Requires at least: 5.5
5
- Tested up to: 6.0.3
6
- Stable tag: 3.1.2
7
- Version: 3.1.2
8
 
9
  Use Google Analytics on your WordPress site without touching any code, and view visitor reports right in your WordPress admin dashboard!
10
 
@@ -142,6 +142,9 @@ Google has already switched to supporting Google Analytics 4. However, you can s
142
 
143
  == Changelog ==
144
 
 
 
 
145
  = 3.1.2 =
146
  * Add source.
147
 
2
  Contributors: sharethis, scottstorebloom, scottmweaver
3
  Tags: analytics, google analytics, google analytics plugin, google analytics widget, google analytics dashboard
4
  Requires at least: 5.5
5
+ Tested up to: 6.1.1
6
+ Stable tag: 3.1.3
7
+ Version: 3.1.3
8
 
9
  Use Google Analytics on your WordPress site without touching any code, and view visitor reports right in your WordPress admin dashboard!
10
 
142
 
143
  == Changelog ==
144
 
145
+ = 3.1.3 =
146
+ * Test with WordPress 6.1.1.
147
+
148
  = 3.1.2 =
149
  * Add source.
150