Google Analytics Dashboard for WP (GADWP) - Version 4.9.6.1

Version Description

  • Enhancements:
    • enable anonymization for all hits instead of single hits to avoid false-positives from IP Anonymization checking tools
Download this release

Release Info

Developer deconf
Plugin Icon 128x128 Google Analytics Dashboard for WP (GADWP)
Version 4.9.6.1
Comparing to
See all releases

Code changes from version 4.9.5 to 4.9.6.1

admin/css/item-reports.css CHANGED
@@ -59,8 +59,8 @@
59
}
60
61
[id^=gadwp-bottomstats-] .inside .small-box h3 {
62
- font-family: 'Open Sans', sans-serif;
63
font-size: 1em;
64
color: #777;
65
padding: 0px 5px 0px 5px;
66
margin: 0px 0px 0px 0px;
@@ -72,6 +72,7 @@
72
[id^=gadwp-bottomstats-] .inside .small-box p {
73
font-size: 1.2em;
74
margin: 0px 0px 2px 0px;
75
}
76
77
.gadwp-floatwraper {
59
}
60
61
[id^=gadwp-bottomstats-] .inside .small-box h3 {
62
font-size: 1em;
63
+ font-weight: normal;
64
color: #777;
65
padding: 0px 5px 0px 5px;
66
margin: 0px 0px 0px 0px;
72
[id^=gadwp-bottomstats-] .inside .small-box p {
73
font-size: 1.2em;
74
margin: 0px 0px 2px 0px;
75
+ color: black;
76
}
77
78
.gadwp-floatwraper {
admin/settings.php CHANGED
@@ -995,7 +995,7 @@ final class GADWP_Settings {
995
$options = self::update_options( 'network' );
996
$message = "<div class='updated'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
997
if ( is_multisite() ) { // Cleanup errors on the entire network
998
- foreach ( GADWP_Tools::get_sites( array( 'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
999
switch_to_blog( $blog['blog_id'] );
1000
GADWP_Tools::delete_cache( 'gapi_errors' );
1001
restore_current_blog();
@@ -1185,7 +1185,7 @@ final class GADWP_Settings {
1185
if ( isset( $options['ga_dash_tableid_network'] ) ) {
1186
$options['ga_dash_tableid_network'] = json_decode( json_encode( $options['ga_dash_tableid_network'] ), false );
1187
}
1188
- foreach ( GADWP_Tools::get_sites( array( 'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
1189
?>
1190
<tr>
1191
<td class="gadwp-settings-title-s"><label for="ga_dash_tableid_network"><?php echo '<strong>'.$blog['domain'].$blog['path'].'</strong>: ';?></label></td>
995
$options = self::update_options( 'network' );
996
$message = "<div class='updated'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
997
if ( is_multisite() ) { // Cleanup errors on the entire network
998
+ foreach ( GADWP_Tools::get_sites( array( 'number' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
999
switch_to_blog( $blog['blog_id'] );
1000
GADWP_Tools::delete_cache( 'gapi_errors' );
1001
restore_current_blog();
1185
if ( isset( $options['ga_dash_tableid_network'] ) ) {
1186
$options['ga_dash_tableid_network'] = json_decode( json_encode( $options['ga_dash_tableid_network'] ), false );
1187
}
1188
+ foreach ( GADWP_Tools::get_sites( array( 'number' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
1189
?>
1190
<tr>
1191
<td class="gadwp-settings-title-s"><label for="ga_dash_tableid_network"><?php echo '<strong>'.$blog['domain'].$blog['path'].'</strong>: ';?></label></td>
admin/setup.php CHANGED
@@ -204,6 +204,9 @@ if ( ! class_exists( 'GADWP_Backend_Setup' ) ) {
204
__( "CAMPAIGN", 'google-analytics-dashboard-for-wp' ),
205
__( "DIRECT", 'google-analytics-dashboard-for-wp' ),
206
__( "NEW", 'google-analytics-dashboard-for-wp' ), //25
207
),
208
'rtLimitPages' => $this->gadwp->config->options['ga_realtime_pages'],
209
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['ga_dash_style'] ),
@@ -263,7 +266,7 @@ if ( ! class_exists( 'GADWP_Backend_Setup' ) ) {
263
'1095daysAgo' => sprintf( _n( "%s Year", "%s Years", 3, 'google-analytics-dashboard-for-wp' ), __('Three', 'google-analytics-dashboard-for-wp') ),
264
),
265
'reportList' => array(
266
- 'sessions' => __( "Sessions", 'google-analytics-dashboard-for-wp' ),
267
'users' => __( "Users", 'google-analytics-dashboard-for-wp' ),
268
'organicSearches' => __( "Organic", 'google-analytics-dashboard-for-wp' ),
269
'pageviews' => __( "Page Views", 'google-analytics-dashboard-for-wp' ),
@@ -280,7 +283,7 @@ if ( ! class_exists( 'GADWP_Backend_Setup' ) ) {
280
__( "Visitor Type", 'google-analytics-dashboard-for-wp' ),
281
__( "Social Networks", 'google-analytics-dashboard-for-wp' ),
282
__( "Search Engines", 'google-analytics-dashboard-for-wp' ),
283
- __( "Sessions", 'google-analytics-dashboard-for-wp' ),
284
__( "Users", 'google-analytics-dashboard-for-wp' ),
285
__( "Page Views", 'google-analytics-dashboard-for-wp' ),
286
__( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
@@ -294,7 +297,16 @@ if ( ! class_exists( 'GADWP_Backend_Setup' ) ) {
294
__( "Browser", 'google-analytics-dashboard-for-wp' ), //16
295
__( "Operating System", 'google-analytics-dashboard-for-wp' ),
296
__( "Screen Resolution", 'google-analytics-dashboard-for-wp' ),
297
- __( "Mobile Brand", 'google-analytics-dashboard-for-wp' ),
298
),
299
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['ga_dash_style'] ),
300
'region' => $region,
204
__( "CAMPAIGN", 'google-analytics-dashboard-for-wp' ),
205
__( "DIRECT", 'google-analytics-dashboard-for-wp' ),
206
__( "NEW", 'google-analytics-dashboard-for-wp' ), //25
207
+ __( "Time on Page", 'google-analytics-dashboard-for-wp' ),
208
+ __( "Page Load Time", 'google-analytics-dashboard-for-wp' ),
209
+ __( "Session Duration", 'google-analytics-dashboard-for-wp' ),
210
),
211
'rtLimitPages' => $this->gadwp->config->options['ga_realtime_pages'],
212
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['ga_dash_style'] ),
266
'1095daysAgo' => sprintf( _n( "%s Year", "%s Years", 3, 'google-analytics-dashboard-for-wp' ), __('Three', 'google-analytics-dashboard-for-wp') ),
267
),
268
'reportList' => array(
269
+ 'uniquePageviews' => __( "Unique Views", 'google-analytics-dashboard-for-wp' ),
270
'users' => __( "Users", 'google-analytics-dashboard-for-wp' ),
271
'organicSearches' => __( "Organic", 'google-analytics-dashboard-for-wp' ),
272
'pageviews' => __( "Page Views", 'google-analytics-dashboard-for-wp' ),
283
__( "Visitor Type", 'google-analytics-dashboard-for-wp' ),
284
__( "Social Networks", 'google-analytics-dashboard-for-wp' ),
285
__( "Search Engines", 'google-analytics-dashboard-for-wp' ),
286
+ __( "Unique Views", 'google-analytics-dashboard-for-wp' ),
287
__( "Users", 'google-analytics-dashboard-for-wp' ),
288
__( "Page Views", 'google-analytics-dashboard-for-wp' ),
289
__( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
297
__( "Browser", 'google-analytics-dashboard-for-wp' ), //16
298
__( "Operating System", 'google-analytics-dashboard-for-wp' ),
299
__( "Screen Resolution", 'google-analytics-dashboard-for-wp' ),
300
+ __( "Mobile Brand", 'google-analytics-dashboard-for-wp' ), //19
301
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
302
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
303
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
304
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
305
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
306
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ), //25
307
+ __( "Time on Page", 'google-analytics-dashboard-for-wp' ),
308
+ __( "Page Load Time", 'google-analytics-dashboard-for-wp' ),
309
+ __( "Exit Rate", 'google-analytics-dashboard-for-wp' ),
310
),
311
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['ga_dash_style'] ),
312
'region' => $region,
common/js/reports.js CHANGED
@@ -8,7 +8,12 @@
8
9
"use strict";
10
11
- google.charts.load('current', {mapsApiKey: gadwpItemData.mapsApiKey, 'packages':['corechart', 'table', 'orgchart', 'geochart']});
12
google.charts.setOnLoadCallback( GADWPReportLoad );
13
14
// Get the numeric ID
@@ -458,9 +463,12 @@ jQuery.fn.extend( {
458
jQuery( "#gdsessions" + slug ).html( data[ 0 ] );
459
jQuery( "#gdusers" + slug ).html( data[ 1 ] );
460
jQuery( "#gdpageviews" + slug ).html( data[ 2 ] );
461
- jQuery( "#gdbouncerate" + slug ).html( data[ 3 ] + "%" );
462
jQuery( "#gdorganicsearch" + slug ).html( data[ 4 ] );
463
jQuery( "#gdpagespervisit" + slug ).html( data[ 5 ] );
464
},
465
466
rtOnlyUniqueValues : function ( value, index, self ) {
@@ -973,6 +981,9 @@ jQuery.fn.extend( {
973
tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 8 ] + '</h3><p id="gdbouncerate' + slug + '">&nbsp;</p></div>';
974
tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 9 ] + '</h3><p id="gdorganicsearch' + slug + '">&nbsp;</p></div>';
975
tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 10 ] + '</h3><p id="gdpagespervisit' + slug + '">&nbsp;</p></div>';
976
tpl += '</div>';
977
tpl += '</div>';
978
tpl += '</div>';
8
9
"use strict";
10
11
+ if ( gadwpItemData.mapsApiKey ) {
12
+ google.charts.load('current', {mapsApiKey: gadwpItemData.mapsApiKey, 'packages':['corechart', 'table', 'orgchart', 'geochart']});
13
+ } else {
14
+ google.charts.load('current', {'packages':['corechart', 'table', 'orgchart', 'geochart']});
15
+ }
16
+
17
google.charts.setOnLoadCallback( GADWPReportLoad );
18
19
// Get the numeric ID
463
jQuery( "#gdsessions" + slug ).html( data[ 0 ] );
464
jQuery( "#gdusers" + slug ).html( data[ 1 ] );
465
jQuery( "#gdpageviews" + slug ).html( data[ 2 ] );
466
+ jQuery( "#gdbouncerate" + slug ).html( data[ 3 ] );
467
jQuery( "#gdorganicsearch" + slug ).html( data[ 4 ] );
468
jQuery( "#gdpagespervisit" + slug ).html( data[ 5 ] );
469
+ jQuery( "#gdpagetime" + slug ).html( data[ 6 ] );
470
+ jQuery( "#gdpageload" + slug ).html( data[ 7 ] );
471
+ jQuery( "#gdsessionduration" + slug ).html( data[ 8 ] );
472
},
473
474
rtOnlyUniqueValues : function ( value, index, self ) {
981
tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 8 ] + '</h3><p id="gdbouncerate' + slug + '">&nbsp;</p></div>';
982
tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 9 ] + '</h3><p id="gdorganicsearch' + slug + '">&nbsp;</p></div>';
983
tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 10 ] + '</h3><p id="gdpagespervisit' + slug + '">&nbsp;</p></div>';
984
+ tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 26 ] + '</h3><p id="gdpagetime' + slug + '">&nbsp;</p></div>';
985
+ tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 27 ] + '</h3><p id="gdpageload' + slug + '">&nbsp;</p></div>';
986
+ tpl += '<div class="small-box"><h3>' + gadwpItemData.i18n[ 28 ] + '</h3><p id="gdsessionduration' + slug + '">&nbsp;</p></div>';
987
tpl += '</div>';
988
tpl += '</div>';
989
tpl += '</div>';
config.php CHANGED
@@ -223,7 +223,7 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
223
GADWP_Tools::clear_cache();
224
GADWP_Tools::delete_cache( 'last_error' );
225
if ( is_multisite() ) { // Cleanup errors and cookies on the entire network
226
- foreach ( GADWP_Tools::get_sites( array( 'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
227
switch_to_blog( $blog['blog_id'] );
228
GADWP_Tools::delete_cache( 'gapi_errors' );
229
restore_current_blog();
223
GADWP_Tools::clear_cache();
224
GADWP_Tools::delete_cache( 'last_error' );
225
if ( is_multisite() ) { // Cleanup errors and cookies on the entire network
226
+ foreach ( GADWP_Tools::get_sites( array( 'number' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
227
switch_to_blog( $blog['blog_id'] );
228
GADWP_Tools::delete_cache( 'gapi_errors' );
229
restore_current_blog();
front/setup.php CHANGED
@@ -74,7 +74,7 @@ if ( ! class_exists( 'GADWP_Frontend_Setup' ) ) {
74
'1095daysAgo' => sprintf( _n( "%s Year", "%s Years", 3, 'google-analytics-dashboard-for-wp' ), __('Three', 'google-analytics-dashboard-for-wp') ),
75
),
76
'reportList' => array(
77
- 'sessions' => __( "Sessions", 'google-analytics-dashboard-for-wp' ),
78
'users' => __( "Users", 'google-analytics-dashboard-for-wp' ),
79
'organicSearches' => __( "Organic", 'google-analytics-dashboard-for-wp' ),
80
'pageviews' => __( "Page Views", 'google-analytics-dashboard-for-wp' ),
@@ -91,7 +91,7 @@ if ( ! class_exists( 'GADWP_Frontend_Setup' ) ) {
91
__( "Visitor Type", 'google-analytics-dashboard-for-wp' ),
92
__( "Search Engines", 'google-analytics-dashboard-for-wp' ),
93
__( "Social Networks", 'google-analytics-dashboard-for-wp' ),
94
- __( "Sessions", 'google-analytics-dashboard-for-wp' ),
95
__( "Users", 'google-analytics-dashboard-for-wp' ),
96
__( "Page Views", 'google-analytics-dashboard-for-wp' ),
97
__( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
@@ -106,6 +106,15 @@ if ( ! class_exists( 'GADWP_Frontend_Setup' ) ) {
106
__( "Operating System", 'google-analytics-dashboard-for-wp' ),
107
__( "Screen Resolution", 'google-analytics-dashboard-for-wp' ),
108
__( "Mobile Brand", 'google-analytics-dashboard-for-wp' ),
109
),
110
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['ga_dash_style'] ),
111
'region' => $region,
74
'1095daysAgo' => sprintf( _n( "%s Year", "%s Years", 3, 'google-analytics-dashboard-for-wp' ), __('Three', 'google-analytics-dashboard-for-wp') ),
75
),
76
'reportList' => array(
77
+ 'uniquePageviews' => __( "Unique Views", 'google-analytics-dashboard-for-wp' ),
78
'users' => __( "Users", 'google-analytics-dashboard-for-wp' ),
79
'organicSearches' => __( "Organic", 'google-analytics-dashboard-for-wp' ),
80
'pageviews' => __( "Page Views", 'google-analytics-dashboard-for-wp' ),
91
__( "Visitor Type", 'google-analytics-dashboard-for-wp' ),
92
__( "Search Engines", 'google-analytics-dashboard-for-wp' ),
93
__( "Social Networks", 'google-analytics-dashboard-for-wp' ),
94
+ __( "Unique Views", 'google-analytics-dashboard-for-wp' ),
95
__( "Users", 'google-analytics-dashboard-for-wp' ),
96
__( "Page Views", 'google-analytics-dashboard-for-wp' ),
97
__( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
106
__( "Operating System", 'google-analytics-dashboard-for-wp' ),
107
__( "Screen Resolution", 'google-analytics-dashboard-for-wp' ),
108
__( "Mobile Brand", 'google-analytics-dashboard-for-wp' ),
109
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
110
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
111
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
112
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
113
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ),
114
+ __( "Future Use", 'google-analytics-dashboard-for-wp' ), //25
115
+ __( "Time on Page", 'google-analytics-dashboard-for-wp' ),
116
+ __( "Page Load Time", 'google-analytics-dashboard-for-wp' ),
117
+ __( "Exit Rate", 'google-analytics-dashboard-for-wp' ),
118
),
119
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['ga_dash_style'] ),
120
'region' => $region,
front/tracking/code-universal.php CHANGED
@@ -125,11 +125,15 @@ if ( $this->gadwp->config->options['ga_user_dimindex'] ) {
125
ga('set', 'dimension<?php echo (int)$this->gadwp->config->options ['ga_user_dimindex']; ?>', '<?php echo is_user_logged_in()?'registered':'guest'; ?>');
126
<?php
127
}
128
- do_action( 'ga_dash_addtrackingcode' );
129
if ( $this->gadwp->config->options['ga_dash_anonim'] ) {
130
- ?> ga('send', 'pageview', {'anonymizeIp': true});<?php } else {?> ga('send', 'pageview');
131
<?php
132
}
133
if ( $this->gadwp->config->options['ga_dash_adsense'] ) {
134
?>
135
125
ga('set', 'dimension<?php echo (int)$this->gadwp->config->options ['ga_user_dimindex']; ?>', '<?php echo is_user_logged_in()?'registered':'guest'; ?>');
126
<?php
127
}
128
if ( $this->gadwp->config->options['ga_dash_anonim'] ) {
129
+ ?>
130
+ ga('set', 'anonymizeIp', true);
131
<?php
132
}
133
+ do_action( 'ga_dash_addtrackingcode' );
134
+ ?>
135
+ ga('send', 'pageview');
136
+ <?php
137
if ( $this->gadwp->config->options['ga_dash_adsense'] ) {
138
?>
139
gadwp.php CHANGED
@@ -4,7 +4,7 @@
4
* Plugin URI: https://deconf.com
5
* Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
6
* Author: Alin Marcu
7
- * Version: 4.9.5
8
* Author URI: https://deconf.com
9
* Text Domain: google-analytics-dashboard-for-wp
10
* Domain Path: /languages
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) )
16
17
// Plugin Version
18
if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
19
- define( 'GADWP_CURRENT_VERSION', '4.9.5' );
20
}
21
22
if ( ! class_exists( 'GADWP_Manager' ) ) {
4
* Plugin URI: https://deconf.com
5
* Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
6
* Author: Alin Marcu
7
+ * Version: 4.9.6.1
8
* Author URI: https://deconf.com
9
* Text Domain: google-analytics-dashboard-for-wp
10
* Domain Path: /languages
16
17
// Plugin Version
18
if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
19
+ define( 'GADWP_CURRENT_VERSION', '4.9.6.1' );
20
}
21
22
if ( ! class_exists( 'GADWP_Manager' ) ) {
install/uninstall.php CHANGED
@@ -16,7 +16,7 @@ class GADWP_Uninstall {
16
public static function uninstall() {
17
global $wpdb;
18
if ( is_multisite() ) { // Cleanup Network install
19
- foreach ( GADWP_Tools::get_sites( array( 'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
20
switch_to_blog( $blog['blog_id'] );
21
$sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'gadwp_cache_%%'" );
22
delete_option( 'gadash_options' );
16
public static function uninstall() {
17
global $wpdb;
18
if ( is_multisite() ) { // Cleanup Network install
19
+ foreach ( GADWP_Tools::get_sites( array( 'number' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
20
switch_to_blog( $blog['blog_id'] );
21
$sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'gadwp_cache_%%'" );
22
delete_option( 'gadash_options' );
readme.txt CHANGED
@@ -1,17 +1,17 @@
1
=== Google Analytics Dashboard for WP ===
2
Contributors: deconf
3
Donate link: https://deconf.com/donate/
4
- Tags: google,analytics,google analytics,dashboard,analytics dashboard,google analytics dashboard,google analytics plugin,google analytics widget,tracking,universal google analytics,realtime,multisite,gadwp
5
Requires at least: 3.5
6
- Tested up to: 4.7
7
- Stable tag: 4.9.5
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
11
- Displays Google Analytics reports in your WordPress Dashboard. Inserts the latest Google Analytics tracking code in your pages.
12
13
== Description ==
14
- This Google Analytics for WordPress plugin enables you to track your site using the latest Google Analytics tracking code and allows you to view key Google Analytics reports in your WordPress install.
15
16
In addition to a set of general Google Analytics reports, in-depth Page reports and in-depth Post reports allow further segmentation of your analytics data, providing performance details for each post or page from your website.
17
@@ -137,13 +137,24 @@ Google Analytics Dashboard for WP it's released under the GPLv2, you can use it
137
138
== Changelog ==
139
140
= 4.9.5 =
141
* Bug Fixes:
142
* correction of some files with mixed endings, props by [Edward Dekker](http://www.github.com/edwarddekker)
143
* only load the necessary resources for frontend widget
144
* corrected a JavaScript error on frontend sidebar widget
145
- * Enhancements:
146
- * introducing the <strong>gadwp_curl_options</strong> filter to allow changes on CURL options for the Google_IO_Curl class, props by [Alexandre Simard](https://github.com/brocheafoin)
147
148
= 4.9.4 =
149
* Enhancements:
1
=== Google Analytics Dashboard for WP ===
2
Contributors: deconf
3
Donate link: https://deconf.com/donate/
4
+ Tags: stats,analytics,google analytics,dashboard,analytics dashboard,google analytics dashboard,google analytics plugin,google analytics widget,tracking,universal google analytics,realtime,multisite,gadwp
5
Requires at least: 3.5
6
+ Tested up to: 4.7.2
7
+ Stable tag: 4.9.6.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
11
+ Displays Google Analytics stats in your WordPress Dashboard. Inserts the latest Google Analytics tracking code in your pages.
12
13
== Description ==
14
+ This Google Analytics for WordPress plugin enables you to track your site using the latest Google Analytics tracking code and allows you to view key Google Analytics stats in your WordPress install.
15
16
In addition to a set of general Google Analytics reports, in-depth Page reports and in-depth Post reports allow further segmentation of your analytics data, providing performance details for each post or page from your website.
17
137
138
== Changelog ==
139
140
+ = 4.9.6.1 =
141
+ * Enhancements:
142
+ * enable anonymization for all hits instead of single hits to avoid false-positives from IP Anonymization checking tools
143
+
144
+ = 4.9.6 =
145
+ * Enhancements:
146
+ * introducing average time on page, average page load time, average exit rate, and average session duration metrics
147
+ * Bug Fixes:
148
+ * use Google Maps API key only if available
149
+ * fixes gadwp_sites_limit filter
150
+
151
= 4.9.5 =
152
+ * Enhancements:
153
+ * introducing the <strong>gadwp_curl_options</strong> filter to allow changes on CURL options for the Google_IO_Curl class, props by [Alexandre Simard](https://github.com/brocheafoin)
154
* Bug Fixes:
155
* correction of some files with mixed endings, props by [Edward Dekker](http://www.github.com/edwarddekker)
156
* only load the necessary resources for frontend widget
157
* corrected a JavaScript error on frontend sidebar widget
158
159
= 4.9.4 =
160
* Enhancements:
tools/gapi.php CHANGED
@@ -341,6 +341,9 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
341
case 'organicSearches' :
342
$title = __( "Organic Searches", 'google-analytics-dashboard-for-wp' );
343
break;
344
default :
345
$title = __( "Sessions", 'google-analytics-dashboard-for-wp' );
346
}
@@ -409,15 +412,15 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
409
$options = array( 'dimensions' => null, 'quotaUser' => $this->managequota . 'p' . $projectId );
410
if ( $filter ) {
411
$options['filters'] = 'ga:pagePath==' . $filter;
412
- $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
413
} else {
414
- $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
415
}
416
$serial = 'qr3_' . $this->get_serial( $projectId . $from . $filter );
417
$data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
418
if ( is_numeric( $data ) ) {
419
if ( $data == - 21 ) {
420
- return array_fill( 0, 6, 0 );
421
} else {
422
return $data;
423
}
@@ -431,10 +434,17 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
431
$gadwp_data[0] = number_format_i18n( $gadwp_data[0] );
432
$gadwp_data[1] = number_format_i18n( $gadwp_data[1] );
433
$gadwp_data[2] = number_format_i18n( $gadwp_data[2] );
434
- $gadwp_data[3] = number_format_i18n( $gadwp_data[3], 2 );
435
$gadwp_data[4] = number_format_i18n( $gadwp_data[4] );
436
$gadwp_data[5] = number_format_i18n( $gadwp_data[5], 2 );
437
-
438
return $gadwp_data;
439
}
440
@@ -830,7 +840,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
830
if ( empty( $projectId ) || ! is_numeric( $projectId ) ) {
831
wp_die( - 26 );
832
}
833
- if ( in_array( $query, array( 'sessions', 'users', 'organicSearches', 'visitBounceRate', 'pageviews') ) ) {
834
return $this->get_areachart_data( $projectId, $from, $to, $query, $filter );
835
}
836
if ( $query == 'bottomstats' ) {
341
case 'organicSearches' :
342
$title = __( "Organic Searches", 'google-analytics-dashboard-for-wp' );
343
break;
344
+ case 'uniquePageviews' :
345
+ $title = __( "Unique Page Views", 'google-analytics-dashboard-for-wp' );
346
+ break;
347
default :
348
$title = __( "Sessions", 'google-analytics-dashboard-for-wp' );
349
}
412
$options = array( 'dimensions' => null, 'quotaUser' => $this->managequota . 'p' . $projectId );
413
if ( $filter ) {
414
$options['filters'] = 'ga:pagePath==' . $filter;
415
+ $metrics = 'ga:uniquePageviews,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession,ga:avgTimeOnPage,ga:avgPageLoadTime,ga:exitRate';
416
} else {
417
+ $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession,ga:avgTimeOnPage,ga:avgPageLoadTime,ga:avgSessionDuration';
418
}
419
$serial = 'qr3_' . $this->get_serial( $projectId . $from . $filter );
420
$data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
421
if ( is_numeric( $data ) ) {
422
if ( $data == - 21 ) {
423
+ return array_fill( 0, 9, 0 );
424
} else {
425
return $data;
426
}
434
$gadwp_data[0] = number_format_i18n( $gadwp_data[0] );
435
$gadwp_data[1] = number_format_i18n( $gadwp_data[1] );
436
$gadwp_data[2] = number_format_i18n( $gadwp_data[2] );
437
+ $gadwp_data[3] = number_format_i18n( $gadwp_data[3], 2 ) . '%';
438
$gadwp_data[4] = number_format_i18n( $gadwp_data[4] );
439
$gadwp_data[5] = number_format_i18n( $gadwp_data[5], 2 );
440
+ $gadwp_data[6] = gmdate("H:i:s", $gadwp_data[6] );
441
+ $gadwp_data[7] = gmdate("H:i:s", $gadwp_data[7] );
442
+ if ( $filter ) {
443
+ $gadwp_data[8] = number_format_i18n( $gadwp_data[8], 2 ) . '%';
444
+ } else {
445
+ $gadwp_data[8] = gmdate("H:i:s", $gadwp_data[8] );
446
+ }
447
+
448
return $gadwp_data;
449
}
450
840
if ( empty( $projectId ) || ! is_numeric( $projectId ) ) {
841
wp_die( - 26 );
842
}
843
+ if ( in_array( $query, array( 'sessions', 'users', 'organicSearches', 'visitBounceRate', 'pageviews', 'uniquePageviews' ) ) ) {
844
return $this->get_areachart_data( $projectId, $from, $to, $query, $filter );
845
}
846
if ( $query == 'bottomstats' ) {