Google Analytics Dashboard for WP (GADWP) - Version 5.1.1.1

Version Description

  • Enhancements:
    • event hitCallback is now optional and only used if needed, see Tracking with GADWP for details
Download this release

Release Info

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

Code changes from version 5.1.1 to 5.1.1.1

admin/settings.php CHANGED
@@ -24,6 +24,7 @@ final class GADWP_Settings {
24
  $options['ga_dash_anonim'] = 0;
25
  $options['ga_event_tracking'] = 0;
26
  $options['ga_enhanced_links'] = 0;
 
27
  $options['ga_dash_remarketing'] = 0;
28
  $options['ga_event_bouncerate'] = 0;
29
  $options['ga_crossdomain_tracking'] = 0;
@@ -757,6 +758,18 @@ final class GADWP_Settings {
757
  <div class="switch-desc"><?php echo " ".__("enable enhanced link attribution", 'google-analytics-dashboard-for-wp' );?></div>
758
  </td>
759
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
760
  <tr>
761
  <td colspan="2"><?php echo "<h2>" . __( "Cross-domain Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
762
  </tr>
24
  $options['ga_dash_anonim'] = 0;
25
  $options['ga_event_tracking'] = 0;
26
  $options['ga_enhanced_links'] = 0;
27
+ $options['ga_event_precision'] = 0;
28
  $options['ga_dash_remarketing'] = 0;
29
  $options['ga_event_bouncerate'] = 0;
30
  $options['ga_crossdomain_tracking'] = 0;
758
  <div class="switch-desc"><?php echo " ".__("enable enhanced link attribution", 'google-analytics-dashboard-for-wp' );?></div>
759
  </td>
760
  </tr>
761
+ <tr>
762
+ <td colspan="2" class="gadwp-settings-title">
763
+ <div class="button-primary gadwp-settings-switchoo">
764
+ <input type="checkbox" name="options[ga_event_precision]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_precision" <?php checked( $options['ga_event_precision'], 1 ); ?>>
765
+ <label class="gadwp-settings-switchoo-label" for="ga_event_precision">
766
+ <div class="gadwp-settings-switchoo-inner"></div>
767
+ <div class="gadwp-settings-switchoo-switch"></div>
768
+ </label>
769
+ </div>
770
+ <div class="switch-desc"><?php echo " ".__("use hitCallback to increase event tracking accuracy", 'google-analytics-dashboard-for-wp' );?></div>
771
+ </td>
772
+ </tr>
773
  <tr>
774
  <td colspan="2"><?php echo "<h2>" . __( "Cross-domain Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
775
  </tr>
config.php CHANGED
@@ -91,6 +91,7 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
91
  'tm_pagescrolldepth_tracking',
92
  'ga_speed_samplerate',
93
  'ga_user_samplerate',
 
94
  );
95
  foreach ( $numerics as $key ) {
96
  if ( isset( $options[$key] ) ) {
@@ -282,6 +283,7 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
282
  'ga_dash_excludesa', //v5.0
283
  'ga_pagescrolldepth_tracking', //v5.0
284
  'tm_pagescrolldepth_tracking', //v5.0
 
285
  );
286
  foreach ( $zeros as $key ) {
287
  if ( ! isset( $this->options[$key] ) ) {
91
  'tm_pagescrolldepth_tracking',
92
  'ga_speed_samplerate',
93
  'ga_user_samplerate',
94
+ 'ga_event_precision',
95
  );
96
  foreach ( $numerics as $key ) {
97
  if ( isset( $options[$key] ) ) {
283
  'ga_dash_excludesa', //v5.0
284
  'ga_pagescrolldepth_tracking', //v5.0
285
  'tm_pagescrolldepth_tracking', //v5.0
286
+ 'ga_event_precision', //v5.1.1.1
287
  );
288
  foreach ( $zeros as $key ) {
289
  if ( ! isset( $this->options[$key] ) ) {
front/js/tracking-analytics-events.js CHANGED
@@ -1 +1 @@
1
- "use strict";var gadwpRedirectLink;var gadwpRedirectCalled=false;var gadwpDefaultPrevented=false;function gadwpRedirect(){if(gadwpRedirectCalled){return}gadwpRedirectCalled=true;if(!gadwpDefaultPrevented){document.location.href=gadwpRedirectLink}else{gadwpDefaultPrevented=false}}jQuery(window).on("load",function(){if(gadwpUAEventsData.options.event_tracking){jQuery("a").filter(function(){var a=new RegExp(".*\\.("+gadwpUAEventsData.options.event_downloads+")(\\?.*)?$");return this.href.match(a)}).click(function(d){var b=this.getAttribute("data-vars-ga-category")||"download";var c=this.getAttribute("data-vars-ga-action")||"click";var a=this.getAttribute("data-vars-ga-label")||this.href;if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}});jQuery('a[href^="mailto"]').click(function(d){var b=this.getAttribute("data-vars-ga-category")||"email";var c=this.getAttribute("data-vars-ga-action")||"send";var a=this.getAttribute("data-vars-ga-label")||this.href;if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}});jQuery('a[href^="tel"]').click(function(d){if(gadwpUAEventsData.options.event_bouncerate){var b=this.getAttribute("data-vars-ga-category")||"telephone";var c=this.getAttribute("data-vars-ga-action")||"call";var a=this.getAttribute("data-vars-ga-label")||this.href;ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}});if(gadwpUAEventsData.options.root_domain){jQuery('a[href^="http"]').filter(function(){var a=new RegExp(".*\\.("+gadwpUAEventsData.options.event_downloads+")(\\?.*)?$");if(!this.href.match(a)){if(this.href.indexOf(gadwpUAEventsData.options.root_domain)==-1&&this.href.indexOf("://")>-1){return this.href}}}).click(function(d){gadwpRedirectCalled=false;gadwpRedirectLink=this.href;var b=this.getAttribute("data-vars-ga-category")||"outbound";var c=this.getAttribute("data-vars-ga-action")||"click";var a=this.getAttribute("data-vars-ga-label")||this.href;if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1,hitCallback:gadwpRedirect})}else{ga("send","event",b,c,a,{hitCallback:gadwpRedirect})}if(this.target!="_blank"){if(d.isDefaultPrevented()){gadwpDefaultPrevented=true}setTimeout(gadwpRedirect,gadwpUAEventsData.options.event_timeout);return false}else{gadwpRedirectCalled=true}})}}if(gadwpUAEventsData.options.event_affiliates&&gadwpUAEventsData.options.aff_tracking){jQuery("a").filter(function(){if(gadwpUAEventsData.options.event_affiliates!=""){var a=new RegExp("("+gadwpUAEventsData.options.event_affiliates.replace(/\//g,"/")+")");return this.href.match(a)}}).click(function(c){gadwpRedirectCalled=false;gadwpRedirectLink=this.href;var b=this.getAttribute("data-vars-ga-category")||"affiliates";var d=this.getAttribute("data-vars-ga-action")||"click";var a=this.getAttribute("data-vars-ga-label")||this.href;if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,d,a,{nonInteraction:1,hitCallback:gadwpRedirect})}else{ga("send","event",b,d,a,{hitCallback:gadwpRedirect})}if(this.target!="_blank"){if(e.isDefaultPrevented()){gadwpDefaultPrevented=true}setTimeout(gadwpRedirect,gadwpUAEventsData.options.event_timeout);return false}else{gadwpRedirectCalled=true}})}if(gadwpUAEventsData.options.root_domain&&gadwpUAEventsData.options.hash_tracking){jQuery("a").filter(function(){if(this.href.indexOf(gadwpUAEventsData.options.root_domain)!=-1||this.href.indexOf("://")==-1){return this.hash}}).click(function(d){var b=this.getAttribute("data-vars-ga-category")||"hashmark";var c=this.getAttribute("data-vars-ga-action")||"click";var a=this.getAttribute("data-vars-ga-label")||this.href;if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}})}if(gadwpUAEventsData.options.event_formsubmit){jQuery('input[type="submit"]').click(function(f){var d=this;var b=d.getAttribute("data-vars-ga-category")||"form";var c=d.getAttribute("data-vars-ga-action")||"submit";var a=d.getAttribute("data-vars-ga-label")||d.name||d.value;if(gadwpUAEventsData.options.event_formsubmit){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}})}if(gadwpUAEventsData.options.ga_pagescrolldepth_tracking){jQuery.scrollDepth({percentage:true,userTiming:false,pixelDepth:false,gtmOverride:true,nonInteraction:true})}});
1
+ "use strict";var gadwpRedirectLink;var gadwpRedirectCalled=false;var gadwpDefaultPrevented=false;function gadwpRedirect(){if(gadwpRedirectCalled){return}gadwpRedirectCalled=true;if(gadwpDefaultPrevented==false){document.location.href=gadwpRedirectLink}else{gadwpDefaultPrevented=false}}jQuery(window).on("load",function(){if(gadwpUAEventsData.options.event_tracking){jQuery("a").filter(function(){var a=new RegExp(".*\\.("+gadwpUAEventsData.options.event_downloads+")(\\?.*)?$");return this.href.match(a)}).click(function(d){var b=this.getAttribute("data-vars-ga-category")||"download";var c=this.getAttribute("data-vars-ga-action")||"click";var a=this.getAttribute("data-vars-ga-label")||this.href;if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}});jQuery('a[href^="mailto"]').click(function(d){var b=this.getAttribute("data-vars-ga-category")||"email";var c=this.getAttribute("data-vars-ga-action")||"send";var a=this.getAttribute("data-vars-ga-label")||this.href;if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}});jQuery('a[href^="tel"]').click(function(d){if(gadwpUAEventsData.options.event_bouncerate){var b=this.getAttribute("data-vars-ga-category")||"telephone";var c=this.getAttribute("data-vars-ga-action")||"call";var a=this.getAttribute("data-vars-ga-label")||this.href;ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}});if(gadwpUAEventsData.options.root_domain){jQuery('a[href^="http"]').filter(function(){var a=new RegExp(".*\\.("+gadwpUAEventsData.options.event_downloads+")(\\?.*)?$");if(!this.href.match(a)){if(this.href.indexOf(gadwpUAEventsData.options.root_domain)==-1&&this.href.indexOf("://")>-1){return this.href}}}).click(function(d){gadwpRedirectCalled=false;gadwpRedirectLink=this.href;var b=this.getAttribute("data-vars-ga-category")||"outbound";var c=this.getAttribute("data-vars-ga-action")||"click";var a=this.getAttribute("data-vars-ga-label")||this.href;if(this.target!="_blank"&&gadwpUAEventsData.options.event_precision){if(d.isDefaultPrevented()){gadwpDefaultPrevented=true;gadwpRedirectCalled=false}}else{gadwpRedirectCalled=true;gadwpDefaultPrevented=false}if(this.target!="_blank"&&gadwpUAEventsData.options.event_precision){if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1,hitCallback:gadwpRedirect})}else{ga("send","event",b,c,a,{hitCallback:gadwpRedirect})}setTimeout(gadwpRedirect,gadwpUAEventsData.options.event_timeout);return false}else{if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}}})}}if(gadwpUAEventsData.options.event_affiliates&&gadwpUAEventsData.options.aff_tracking){jQuery("a").filter(function(){if(gadwpUAEventsData.options.event_affiliates!=""){var a=new RegExp("("+gadwpUAEventsData.options.event_affiliates.replace(/\//g,"/")+")");return this.href.match(a)}}).click(function(c){gadwpRedirectCalled=false;gadwpRedirectLink=this.href;var b=this.getAttribute("data-vars-ga-category")||"affiliates";var d=this.getAttribute("data-vars-ga-action")||"click";var a=this.getAttribute("data-vars-ga-label")||this.href;if(this.target!="_blank"&&gadwpUAEventsData.options.event_precision){if(e.isDefaultPrevented()){gadwpDefaultPrevented=true;gadwpRedirectCalled=false}}else{gadwpRedirectCalled=true;gadwpDefaultPrevented=false}if(this.target!="_blank"&&gadwpUAEventsData.options.event_precision){if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,d,a,{nonInteraction:1,hitCallback:gadwpRedirect})}else{ga("send","event",b,d,a,{hitCallback:gadwpRedirect})}setTimeout(gadwpRedirect,gadwpUAEventsData.options.event_timeout);return false}else{if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,d,a,{nonInteraction:1})}else{ga("send","event",b,d,a)}}})}if(gadwpUAEventsData.options.root_domain&&gadwpUAEventsData.options.hash_tracking){jQuery("a").filter(function(){if(this.href.indexOf(gadwpUAEventsData.options.root_domain)!=-1||this.href.indexOf("://")==-1){return this.hash}}).click(function(d){var b=this.getAttribute("data-vars-ga-category")||"hashmark";var c=this.getAttribute("data-vars-ga-action")||"click";var a=this.getAttribute("data-vars-ga-label")||this.href;if(gadwpUAEventsData.options.event_bouncerate){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}})}if(gadwpUAEventsData.options.event_formsubmit){jQuery('input[type="submit"]').click(function(f){var d=this;var b=d.getAttribute("data-vars-ga-category")||"form";var c=d.getAttribute("data-vars-ga-action")||"submit";var a=d.getAttribute("data-vars-ga-label")||d.name||d.value;if(gadwpUAEventsData.options.event_formsubmit){ga("send","event",b,c,a,{nonInteraction:1})}else{ga("send","event",b,c,a)}})}if(gadwpUAEventsData.options.ga_pagescrolldepth_tracking){jQuery.scrollDepth({percentage:true,userTiming:false,pixelDepth:false,gtmOverride:true,nonInteraction:true})}});
front/tracking-analytics.php CHANGED
@@ -180,6 +180,7 @@ if ( ! class_exists( 'GADWP_Tracking_Analytics' ) ) {
180
  'hash_tracking' => $this->gadwp->config->options ['ga_hash_tracking'],
181
  'root_domain' => $root_domain,
182
  'event_timeout' => apply_filters( 'gadwp_analyticsevents_timeout', 100 ),
 
183
  'event_formsubmit' => $this->gadwp->config->options ['ga_formsubmit_tracking'],
184
  'ga_pagescrolldepth_tracking' => $this->gadwp->config->options['ga_pagescrolldepth_tracking'],
185
  ),
180
  'hash_tracking' => $this->gadwp->config->options ['ga_hash_tracking'],
181
  'root_domain' => $root_domain,
182
  'event_timeout' => apply_filters( 'gadwp_analyticsevents_timeout', 100 ),
183
+ 'event_precision' => $this->gadwp->config->options['ga_event_precision'],
184
  'event_formsubmit' => $this->gadwp->config->options ['ga_formsubmit_tracking'],
185
  'ga_pagescrolldepth_tracking' => $this->gadwp->config->options['ga_pagescrolldepth_tracking'],
186
  ),
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: 5.1.1
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', '5.1.1' );
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: 5.1.1.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', '5.1.1.1' );
20
  }
21
 
22
  if ( ! class_exists( 'GADWP_Manager' ) ) {
install/install.php CHANGED
@@ -84,6 +84,7 @@ class GADWP_Install {
84
  $options['ga_dash_excludesa'] = 0;
85
  $options['ga_pagescrolldepth_tracking'] = 0;
86
  $options['tm_pagescrolldepth_tracking'] = 0;
 
87
  } else {
88
  $options = array();
89
  $options['ga_dash_clientid'] = get_option( 'ga_dash_clientid' );
@@ -154,6 +155,7 @@ class GADWP_Install {
154
  $options['tm_pagescrolldepth_tracking'] = 0;
155
  $options['ga_speed_samplerate'] = 1;
156
  $options['ga_user_samplerate'] = 100;
 
157
 
158
  delete_option( 'ga_dash_clientid' );
159
  delete_option( 'ga_dash_clientsecret' );
84
  $options['ga_dash_excludesa'] = 0;
85
  $options['ga_pagescrolldepth_tracking'] = 0;
86
  $options['tm_pagescrolldepth_tracking'] = 0;
87
+ $options['ga_event_precision'] = 0;
88
  } else {
89
  $options = array();
90
  $options['ga_dash_clientid'] = get_option( 'ga_dash_clientid' );
155
  $options['tm_pagescrolldepth_tracking'] = 0;
156
  $options['ga_speed_samplerate'] = 1;
157
  $options['ga_user_samplerate'] = 100;
158
+ $options['ga_event_precision'] = 0;
159
 
160
  delete_option( 'ga_dash_clientid' );
161
  delete_option( 'ga_dash_clientsecret' );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://deconf.com/donate/
4
  Tags: analytics,google analytics,google analytics dashboard,google analytics plugin,google analytics widget
5
  Requires at least: 3.5
6
  Tested up to: 4.8
7
- Stable tag: 5.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -167,6 +167,10 @@ This is a major update, please read the [release notes](https://deconf.com/googl
167
 
168
  == Changelog ==
169
 
 
 
 
 
170
  = 5.1.1 =
171
  * New Features:
172
  * adds non-interaction hit support for AMP
4
  Tags: analytics,google analytics,google analytics dashboard,google analytics plugin,google analytics widget
5
  Requires at least: 3.5
6
  Tested up to: 4.8
7
+ Stable tag: 5.1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
167
 
168
  == Changelog ==
169
 
170
+ = 5.1.1.1 =
171
+ * Enhancements:
172
+ * event hitCallback is now optional and only used if needed, see [Tracking with GADWP](https://deconf.com/tracking-google-analytics-dashboard-wordpress/) for details
173
+
174
  = 5.1.1 =
175
  * New Features:
176
  * adds non-interaction hit support for AMP