Version Description
= 7.0.0 =
This is a major release. Please back up your site before upgrading.
= 6.0.0 =
This is a major release. Please back up your site before upgrading.
Download this release
Release Info
Developer | chriscct7 |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 7.4.1 |
Comparing to | |
See all releases |
Code changes from version 7.4.0 to 7.4.1
- googleanalytics.php +2 -2
- includes/admin/admin.php +35 -8
- includes/admin/common.php +34 -12
- includes/admin/pages/settings.php +0 -37
- includes/admin/reports/overview.php +1 -1
- includes/install.php +2 -1
- readme.txt +5 -2
googleanalytics.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Author: MonsterInsights
|
7 |
* Author URI: https://www.monsterinsights.com/?utm_source=liteplugin&utm_medium=pluginheader&utm_campaign=authoruri&utm_content=7%2E0%2E0
|
8 |
*
|
9 |
-
* Version: 7.4.
|
10 |
* Requires at least: 3.8.0
|
11 |
* Tested up to: 5.0
|
12 |
*
|
@@ -69,7 +69,7 @@ final class MonsterInsights_Lite {
|
|
69 |
* @access public
|
70 |
* @var string $version Plugin version.
|
71 |
*/
|
72 |
-
public $version = '7.4.
|
73 |
|
74 |
/**
|
75 |
* Plugin file.
|
6 |
* Author: MonsterInsights
|
7 |
* Author URI: https://www.monsterinsights.com/?utm_source=liteplugin&utm_medium=pluginheader&utm_campaign=authoruri&utm_content=7%2E0%2E0
|
8 |
*
|
9 |
+
* Version: 7.4.1
|
10 |
* Requires at least: 3.8.0
|
11 |
* Tested up to: 5.0
|
12 |
*
|
69 |
* @access public
|
70 |
* @var string $version Plugin version.
|
71 |
*/
|
72 |
+
public $version = '7.4.1';
|
73 |
|
74 |
/**
|
75 |
* Plugin file.
|
includes/admin/admin.php
CHANGED
@@ -99,8 +99,8 @@ add_action( 'network_admin_menu', 'monsterinsights_network_admin_menu', 5 );
|
|
99 |
* @return String Altered body classes.
|
100 |
*/
|
101 |
function monsterinsights_add_admin_body_class( $classes ) {
|
102 |
-
$screen = get_current_screen();
|
103 |
-
if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) {
|
104 |
return $classes;
|
105 |
}
|
106 |
|
@@ -108,6 +108,38 @@ function monsterinsights_add_admin_body_class( $classes ) {
|
|
108 |
}
|
109 |
add_filter( 'admin_body_class', 'monsterinsights_add_admin_body_class', 10, 1 );
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
/**
|
112 |
* Add a link to the settings page to the plugins list
|
113 |
*
|
@@ -193,12 +225,7 @@ function monsterinsights_admin_header() {
|
|
193 |
if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) {
|
194 |
return;
|
195 |
}
|
196 |
-
if (
|
197 |
-
'insights_page_monsterinsights_settings',
|
198 |
-
'toplevel_page_monsterinsights_settings',
|
199 |
-
'toplevel_page_monsterinsights_network-network',
|
200 |
-
'insights_page_monsterinsights_network',
|
201 |
-
), true ) ) {
|
202 |
// Prevent loading the header in the new settings page.
|
203 |
return false;
|
204 |
}
|
99 |
* @return String Altered body classes.
|
100 |
*/
|
101 |
function monsterinsights_add_admin_body_class( $classes ) {
|
102 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
103 |
+
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) {
|
104 |
return $classes;
|
105 |
}
|
106 |
|
108 |
}
|
109 |
add_filter( 'admin_body_class', 'monsterinsights_add_admin_body_class', 10, 1 );
|
110 |
|
111 |
+
/**
|
112 |
+
* Adds one or more classes to the body tag in the dashboard.
|
113 |
+
*
|
114 |
+
* @param String $classes Current body classes.
|
115 |
+
* @return String Altered body classes.
|
116 |
+
*/
|
117 |
+
function monsterinsights_add_admin_body_class_tools_page( $classes ) {
|
118 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
119 |
+
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_tools' ) === false || 'insights_page_monsterinsights_tools' === $screen->id ) {
|
120 |
+
return $classes;
|
121 |
+
}
|
122 |
+
|
123 |
+
return "$classes insights_page_monsterinsights_tools ";
|
124 |
+
}
|
125 |
+
add_filter( 'admin_body_class', 'monsterinsights_add_admin_body_class_tools_page', 10, 1 );
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Adds one or more classes to the body tag in the dashboard.
|
129 |
+
*
|
130 |
+
* @param String $classes Current body classes.
|
131 |
+
* @return String Altered body classes.
|
132 |
+
*/
|
133 |
+
function monsterinsights_add_admin_body_class_addons_page( $classes ) {
|
134 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
135 |
+
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'monsterinsights_addons' ) === false || 'insights_page_monsterinsights_addons' === $screen->id ) {
|
136 |
+
return $classes;
|
137 |
+
}
|
138 |
+
|
139 |
+
return "$classes insights_page_monsterinsights_addons ";
|
140 |
+
}
|
141 |
+
add_filter( 'admin_body_class', 'monsterinsights_add_admin_body_class_addons_page', 10, 1 );
|
142 |
+
|
143 |
/**
|
144 |
* Add a link to the settings page to the plugins list
|
145 |
*
|
225 |
if ( empty( $screen->id ) || strpos( $screen->id, 'monsterinsights' ) === false ) {
|
226 |
return;
|
227 |
}
|
228 |
+
if ( monsterinsights_is_settings_page() ) {
|
|
|
|
|
|
|
|
|
|
|
229 |
// Prevent loading the header in the new settings page.
|
230 |
return false;
|
231 |
}
|
includes/admin/common.php
CHANGED
@@ -14,6 +14,38 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
exit;
|
15 |
}
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* Loads styles for all MonsterInsights-based Administration Screens.
|
19 |
*
|
@@ -39,12 +71,7 @@ function monsterinsights_admin_styles() {
|
|
39 |
}
|
40 |
|
41 |
// For the settings page, load the Vue app styles.
|
42 |
-
if (
|
43 |
-
'insights_page_monsterinsights_settings',
|
44 |
-
'toplevel_page_monsterinsights_settings',
|
45 |
-
'toplevel_page_monsterinsights_network-network',
|
46 |
-
'insights_page_monsterinsights_network',
|
47 |
-
), true ) ) {
|
48 |
$version_path = monsterinsights_is_pro_version() ? 'pro' : 'lite';
|
49 |
if ( ! defined( 'MONSTERINSIGHTS_LOCAL_JS_URL' ) ) {
|
50 |
wp_enqueue_style( 'monsterinsights-vue-style-vendors', plugins_url( $version_path . '/assets/vue/css/chunk-vendors.css', MONSTERINSIGHTS_PLUGIN_FILE ), array(), monsterinsights_get_asset_version() );
|
@@ -120,12 +147,7 @@ function monsterinsights_admin_scripts() {
|
|
120 |
}
|
121 |
|
122 |
// For the settings page, load the Vue app.
|
123 |
-
if (
|
124 |
-
'insights_page_monsterinsights_settings',
|
125 |
-
'toplevel_page_monsterinsights_settings',
|
126 |
-
'toplevel_page_monsterinsights_network-network',
|
127 |
-
'insights_page_monsterinsights_network',
|
128 |
-
), true ) ) {
|
129 |
global $wp_version;
|
130 |
$version_path = monsterinsights_is_pro_version() ? 'pro' : 'lite';
|
131 |
if ( ! defined( 'MONSTERINSIGHTS_LOCAL_JS_URL' ) ) {
|
14 |
exit;
|
15 |
}
|
16 |
|
17 |
+
function monsterinsights_is_settings_page() {
|
18 |
+
$current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
19 |
+
global $admin_page_hooks;
|
20 |
+
|
21 |
+
if ( ! is_object( $current_screen ) || empty( $current_screen->id ) || empty( $admin_page_hooks ) ) {
|
22 |
+
return false;
|
23 |
+
}
|
24 |
+
|
25 |
+
$settings_page = false;
|
26 |
+
if ( ! empty( $admin_page_hooks['monsterinsights_settings'] ) && $current_screen->id === $admin_page_hooks['monsterinsights_settings'] ) {
|
27 |
+
$settings_page = true;
|
28 |
+
}
|
29 |
+
|
30 |
+
if ( $current_screen->id === 'toplevel_page_monsterinsights_settings' ) {
|
31 |
+
$settings_page = true;
|
32 |
+
}
|
33 |
+
|
34 |
+
if ( $current_screen->id === 'insights_page_monsterinsights_settings' ) {
|
35 |
+
$settings_page = true;
|
36 |
+
}
|
37 |
+
|
38 |
+
if ( strpos( $current_screen->id, 'monsterinsights_settings' ) !== false ) {
|
39 |
+
$settings_page = true;
|
40 |
+
}
|
41 |
+
|
42 |
+
if ( ! empty( $current_screen->base ) && strpos( $current_screen->base, 'monsterinsights_network' ) !== false ) {
|
43 |
+
$settings_page = true;
|
44 |
+
}
|
45 |
+
|
46 |
+
return $settings_page;
|
47 |
+
}
|
48 |
+
|
49 |
/**
|
50 |
* Loads styles for all MonsterInsights-based Administration Screens.
|
51 |
*
|
71 |
}
|
72 |
|
73 |
// For the settings page, load the Vue app styles.
|
74 |
+
if ( monsterinsights_is_settings_page() ) {
|
|
|
|
|
|
|
|
|
|
|
75 |
$version_path = monsterinsights_is_pro_version() ? 'pro' : 'lite';
|
76 |
if ( ! defined( 'MONSTERINSIGHTS_LOCAL_JS_URL' ) ) {
|
77 |
wp_enqueue_style( 'monsterinsights-vue-style-vendors', plugins_url( $version_path . '/assets/vue/css/chunk-vendors.css', MONSTERINSIGHTS_PLUGIN_FILE ), array(), monsterinsights_get_asset_version() );
|
147 |
}
|
148 |
|
149 |
// For the settings page, load the Vue app.
|
150 |
+
if ( monsterinsights_is_settings_page() ) {
|
|
|
|
|
|
|
|
|
|
|
151 |
global $wp_version;
|
152 |
$version_path = monsterinsights_is_pro_version() ? 'pro' : 'lite';
|
153 |
if ( ! defined( 'MONSTERINSIGHTS_LOCAL_JS_URL' ) ) {
|
includes/admin/pages/settings.php
CHANGED
@@ -4,43 +4,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit;
|
5 |
}
|
6 |
|
7 |
-
function monsterinsights_is_settings_page() {
|
8 |
-
$current_screen = get_current_screen();
|
9 |
-
global $admin_page_hooks;
|
10 |
-
|
11 |
-
if ( ! is_object( $current_screen ) || empty( $current_screen->id ) || empty( $admin_page_hooks ) ) {
|
12 |
-
return false;
|
13 |
-
}
|
14 |
-
|
15 |
-
$settings_page = false;
|
16 |
-
if ( ! empty( $admin_page_hooks['monsterinsights_settings'] ) && $current_screen->id === $admin_page_hooks['monsterinsights_settings'] ) {
|
17 |
-
$settings_page = true;
|
18 |
-
}
|
19 |
-
|
20 |
-
if ( ! empty( $admin_page_hooks['monsterinsights_reports'] ) && $current_screen->id === $admin_page_hooks['monsterinsights_reports'] ) {
|
21 |
-
$settings_page = true;
|
22 |
-
}
|
23 |
-
|
24 |
-
if ( $current_screen->id === 'toplevel_page_monsterinsights_settings' ) {
|
25 |
-
$settings_page = true;
|
26 |
-
}
|
27 |
-
|
28 |
-
if ( $current_screen->id === 'insights_page_monsterinsights_settings' ) {
|
29 |
-
$settings_page = true;
|
30 |
-
}
|
31 |
-
|
32 |
-
if ( $current_screen->id === 'insights_page_monsterinsights_tracking' ) {
|
33 |
-
$settings_page = true;
|
34 |
-
}
|
35 |
-
|
36 |
-
if ( ! empty( $current_screen->base ) && strpos( $current_screen->base, 'monsterinsights_network' ) !== false ) {
|
37 |
-
$settings_page = true;
|
38 |
-
}
|
39 |
-
|
40 |
-
return $settings_page;
|
41 |
-
}
|
42 |
-
|
43 |
-
|
44 |
/**
|
45 |
* Callback to output the MonsterInsights settings page.
|
46 |
*
|
4 |
exit;
|
5 |
}
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
/**
|
8 |
* Callback to output the MonsterInsights settings page.
|
9 |
*
|
includes/admin/reports/overview.php
CHANGED
@@ -964,7 +964,7 @@ final class MonsterInsights_Report_Overview extends MonsterInsights_Report {
|
|
964 |
</ul>
|
965 |
</div>
|
966 |
<?php
|
967 |
-
$referral_url = 'https://analytics.google.com/analytics/web
|
968 |
?>
|
969 |
<div class="monsterinsights-reports-panel-footer monsterinsights-reports-panel-footer-large">
|
970 |
<?php echo esc_html__( 'Show', 'google-analytics-for-wordpress' ); ?>
|
964 |
</ul>
|
965 |
</div>
|
966 |
<?php
|
967 |
+
$referral_url = 'https://analytics.google.com/analytics/web/#/report/content-pages/' . MonsterInsights()->auth->get_referral_url() . $this->get_ga_report_range( $data );
|
968 |
?>
|
969 |
<div class="monsterinsights-reports-panel-footer monsterinsights-reports-panel-footer-large">
|
970 |
<?php echo esc_html__( 'Show', 'google-analytics-for-wordpress' ); ?>
|
includes/install.php
CHANGED
@@ -224,7 +224,8 @@ class MonsterInsights_Install {
|
|
224 |
'anonymize_ips' => 0,
|
225 |
'extensions_of_files' => 'doc,exe,js,pdf,ppt,tgz,zip,xls',
|
226 |
'subdomain_tracking' => '',
|
227 |
-
'
|
|
|
228 |
'allow_anchor' => 0,
|
229 |
'add_allow_linker' => 0,
|
230 |
'custom_code' => '',
|
224 |
'anonymize_ips' => 0,
|
225 |
'extensions_of_files' => 'doc,exe,js,pdf,ppt,tgz,zip,xls',
|
226 |
'subdomain_tracking' => '',
|
227 |
+
'link_attribution' => true,
|
228 |
+
'tag_links_in_rss' => true,
|
229 |
'allow_anchor' => 0,
|
230 |
'add_allow_linker' => 0,
|
231 |
'custom_code' => '',
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.wpbeginner.com/wpbeginner-needs-your-help/
|
|
4 |
Tags: WordPress analytics, google analytics, google analytics dashboard, google analytics widget, WooCommerce stats, analytics dashboard, universal google analytics, statistics, tracking, stats, google, google analytics by yoast, ga, monster insights, monsterinsights, universal analytics, web stats, ecommerce, ecommerce tracking
|
5 |
Requires at least: 3.8.0
|
6 |
Tested up to: 5.0
|
7 |
-
Stable tag: 7.4.
|
8 |
License: GPL v3
|
9 |
|
10 |
The best Google Analytics plugin for WordPress. See how visitors find and use your website, so you can keep them coming back.
|
@@ -273,6 +273,9 @@ You can also learn about other <a href="http://www.wpbeginner.com/category/plugi
|
|
273 |
4. Want more features? <a href="https://www.monsterinsights.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion">Purchase MonsterInsights Pro</a>!
|
274 |
|
275 |
== Changelog ==
|
|
|
|
|
|
|
276 |
= 7.4.0: January 15, 2018 =
|
277 |
- New: Brand new settings panel written in VueJS! The new panel has been designed to simplify the process of setting up MonsterInsights and make MonsterInsights's powerful features more user friendly to use.
|
278 |
- New: Brand new onboarding wizard that walks you through setting up MonsterInsights and automatically configures your MonsterInsights settings based on your website needs in just a few minutes.
|
@@ -546,7 +549,7 @@ You can also learn about other <a href="http://www.wpbeginner.com/category/plugi
|
|
546 |
* New: Tracking is now enabled for the WordPress admin login page (wp-login.php).
|
547 |
* Tweak: The Google class in the admin now only checks for blocking when the reauth is attempted. Expect to save a ton of external calls in the admin, and maybe a performance boost.
|
548 |
* Tweak: The GA client object is now lazyloaded on the frontend, so it's loaded only when something (like another plugin) attempts to use it. In plain English, this will make a alot of sites load times significantly improve.
|
549 |
-
* Tweak: The analytics.js output has been tweaked to be slightly more
|
550 |
* Tweak: The config expired notice has been updated to reflect that it can also be shown if the server is blocking MonsterInsights's ability to connect to Google Analytics.
|
551 |
* Tweak: The cron jobs for opt-in tracking and statistics have been combined into a single cron.
|
552 |
* Tweak: Various performance improvements in the frontend output class.
|
4 |
Tags: WordPress analytics, google analytics, google analytics dashboard, google analytics widget, WooCommerce stats, analytics dashboard, universal google analytics, statistics, tracking, stats, google, google analytics by yoast, ga, monster insights, monsterinsights, universal analytics, web stats, ecommerce, ecommerce tracking
|
5 |
Requires at least: 3.8.0
|
6 |
Tested up to: 5.0
|
7 |
+
Stable tag: 7.4.1
|
8 |
License: GPL v3
|
9 |
|
10 |
The best Google Analytics plugin for WordPress. See how visitors find and use your website, so you can keep them coming back.
|
273 |
4. Want more features? <a href="https://www.monsterinsights.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion">Purchase MonsterInsights Pro</a>!
|
274 |
|
275 |
== Changelog ==
|
276 |
+
= 7.4.1: January 16, 2018 =
|
277 |
+
- Fixed: WordPress Core currently has a bug (18857) that affects a super small percentage of our userbase (under 3%) that we've patched our plugin for until WordPress can get a fix shipped in a release.
|
278 |
+
|
279 |
= 7.4.0: January 15, 2018 =
|
280 |
- New: Brand new settings panel written in VueJS! The new panel has been designed to simplify the process of setting up MonsterInsights and make MonsterInsights's powerful features more user friendly to use.
|
281 |
- New: Brand new onboarding wizard that walks you through setting up MonsterInsights and automatically configures your MonsterInsights settings based on your website needs in just a few minutes.
|
549 |
* New: Tracking is now enabled for the WordPress admin login page (wp-login.php).
|
550 |
* Tweak: The Google class in the admin now only checks for blocking when the reauth is attempted. Expect to save a ton of external calls in the admin, and maybe a performance boost.
|
551 |
* Tweak: The GA client object is now lazyloaded on the frontend, so it's loaded only when something (like another plugin) attempts to use it. In plain English, this will make a alot of sites load times significantly improve.
|
552 |
+
* Tweak: The analytics.js output has been tweaked to be slightly more aesthetically pleasing (its aligned correctly). We realize no one probably cares but we look at this code for every user we support, so it help us.
|
553 |
* Tweak: The config expired notice has been updated to reflect that it can also be shown if the server is blocking MonsterInsights's ability to connect to Google Analytics.
|
554 |
* Tweak: The cron jobs for opt-in tracking and statistics have been combined into a single cron.
|
555 |
* Tweak: Various performance improvements in the frontend output class.
|