Google Analytics for WordPress by MonsterInsights - Version 6.1.4

Version Description

= 6.0.0 =

This is a major release. Please back up your site before upgrading.

Download this release

Release Info

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

Code changes from version 6.1.3 to 6.1.4

assets/js/frontend.js CHANGED
@@ -38,13 +38,18 @@ var MonsterInsights = function(){
38
  }
39
  }
40
 
 
 
 
 
 
 
 
41
  function __gaTrackerSend ( valuesArray, fieldsArray ) {
42
  valuesArray = typeof valuesArray !== 'undefined' ? valuesArray : [];
43
- fieldsArray = typeof fieldsArray !== 'undefined' ? fieldsArray : [];
44
 
45
- if ( fieldsArray.length > 0 ) {
46
- __gaTracker( 'send', fieldsArray );
47
- }
48
 
49
  lastClicked.valuesArray = valuesArray;
50
  lastClicked.fieldsArray = fieldsArray;
@@ -269,37 +274,47 @@ var MonsterInsights = function(){
269
  if ( target || type == 'mailto' ) { /* If target opens a new window then just track */
270
  if ( type == 'download' ) {
271
  if ( track_download_as == 'pageview' ) {
272
- fieldsArray.hitType = 'pageview';
273
- fieldsArray.page = link;
 
 
274
 
275
  __gaTrackerSend( valuesArray, fieldsArray );
276
  } else {
277
- fieldsArray.hitType = 'event';
278
- fieldsArray.eventCategory = 'download';
279
- fieldsArray.eventAction = link;
280
- fieldsArray.eventLabel = valuesArray.title;
 
 
281
 
282
  __gaTrackerSend( valuesArray, fieldsArray );
283
  }
284
  } else if ( type == 'mailto' ) {
285
- fieldsArray.hitType = 'event';
286
- fieldsArray.eventCategory = 'mailto';
287
- fieldsArray.eventAction = link;
288
- fieldsArray.eventLabel = valuesArray.title;
 
 
289
 
290
  __gaTrackerSend( valuesArray, fieldsArray );
291
  } else if ( type == 'internal-as-outbound' ) {
292
- fieldsArray.hitType = 'event';
293
- fieldsArray.eventCategory = internal_label;
294
- fieldsArray.eventAction = link;
295
- fieldsArray.eventLabel = valuesArray.title;
 
 
296
 
297
  __gaTrackerSend( valuesArray, fieldsArray );
298
  } else if ( type == 'external' ) {
299
- fieldsArray.hitType = 'event';
300
- fieldsArray.eventCategory = 'outbound-link';
301
- fieldsArray.eventAction = link;
302
- fieldsArray.eventLabel = valuesArray.title;
 
 
303
 
304
  __gaTrackerSend( valuesArray, fieldsArray );
305
  } else {
@@ -320,17 +335,21 @@ var MonsterInsights = function(){
320
 
321
  if ( type == 'download' ) {
322
  if ( track_download_as == 'pageview' ) {
323
- fieldsArray.hitType = 'pageview';
324
- fieldsArray.page = link;
325
- fieldsArray.hitCallback = __gaTrackerHitBack;
 
 
326
 
327
  __gaTrackerSend( valuesArray, fieldsArray );
328
  } else {
329
- fieldsArray.hitType = 'event';
330
- fieldsArray.eventCategory = 'download';
331
- fieldsArray.eventAction = link;
332
- fieldsArray.eventLabel = valuesArray.title;
333
- fieldsArray.hitCallback = __gaTrackerHitBack;
 
 
334
 
335
  __gaTrackerSend( valuesArray, fieldsArray );
336
  }
@@ -344,11 +363,13 @@ var MonsterInsights = function(){
344
  }
345
  }
346
 
347
- fieldsArray.hitType = 'event';
348
- fieldsArray.eventCategory = internal_label;
349
- fieldsArray.eventAction = link;
350
- fieldsArray.eventLabel = valuesArray.title;
351
- fieldsArray.hitCallback = __gaTrackerHitBack;
 
 
352
 
353
  if ( navigator.sendBeacon ) {
354
  fieldsArray.transport = 'beacon';
@@ -367,11 +388,13 @@ var MonsterInsights = function(){
367
  }
368
  }
369
 
370
- fieldsArray.hitType = 'event';
371
- fieldsArray.eventCategory = 'outbound-link';
372
- fieldsArray.eventAction = link;
373
- fieldsArray.eventLabel = valuesArray.title;
374
- fieldsArray.hitCallback = __gaTrackerHitBack;
 
 
375
 
376
  if ( navigator.sendBeacon ) {
377
  fieldsArray.transport = 'beacon';
38
  }
39
  }
40
 
41
+ function toObject(arr) {
42
+ var rv = {};
43
+ for (var i = 0; i < arr.length; ++i)
44
+ rv[i] = arr[i];
45
+ return rv;
46
+ }
47
+
48
  function __gaTrackerSend ( valuesArray, fieldsArray ) {
49
  valuesArray = typeof valuesArray !== 'undefined' ? valuesArray : [];
50
+ fieldsArray = typeof fieldsArray !== 'undefined' ? fieldsArray : {};
51
 
52
+ __gaTracker( 'send', fieldsArray );
 
 
53
 
54
  lastClicked.valuesArray = valuesArray;
55
  lastClicked.fieldsArray = fieldsArray;
274
  if ( target || type == 'mailto' ) { /* If target opens a new window then just track */
275
  if ( type == 'download' ) {
276
  if ( track_download_as == 'pageview' ) {
277
+ fieldsArray = {
278
+ hitType : 'pageview',
279
+ page : link,
280
+ };
281
 
282
  __gaTrackerSend( valuesArray, fieldsArray );
283
  } else {
284
+ fieldsArray = {
285
+ hitType : 'event',
286
+ eventCategory : 'download',
287
+ eventAction : link,
288
+ eventLabel : valuesArray.title,
289
+ };
290
 
291
  __gaTrackerSend( valuesArray, fieldsArray );
292
  }
293
  } else if ( type == 'mailto' ) {
294
+ fieldsArray = {
295
+ hitType : 'event',
296
+ eventCategory : 'mailto',
297
+ eventAction : link,
298
+ eventLabel : valuesArray.title,
299
+ };
300
 
301
  __gaTrackerSend( valuesArray, fieldsArray );
302
  } else if ( type == 'internal-as-outbound' ) {
303
+ fieldsArray = {
304
+ hitType : 'event',
305
+ eventCategory : internal_label,
306
+ eventAction : link,
307
+ eventLabel : valuesArray.title,
308
+ };
309
 
310
  __gaTrackerSend( valuesArray, fieldsArray );
311
  } else if ( type == 'external' ) {
312
+ fieldsArray = {
313
+ hitType: 'event',
314
+ eventCategory:'outbound-link',
315
+ eventAction: link,
316
+ eventLabel: valuesArray.title,
317
+ };
318
 
319
  __gaTrackerSend( valuesArray, fieldsArray );
320
  } else {
335
 
336
  if ( type == 'download' ) {
337
  if ( track_download_as == 'pageview' ) {
338
+ fieldsArray = {
339
+ hitType : 'pageview',
340
+ page : link,
341
+ hitCallback : __gaTrackerHitBack,
342
+ };
343
 
344
  __gaTrackerSend( valuesArray, fieldsArray );
345
  } else {
346
+ fieldsArray = {
347
+ hitType : 'event',
348
+ eventCategory : 'download',
349
+ eventAction : link,
350
+ eventLabel : valuesArray.title,
351
+ hitCallback : __gaTrackerHitBack,
352
+ };
353
 
354
  __gaTrackerSend( valuesArray, fieldsArray );
355
  }
363
  }
364
  }
365
 
366
+ fieldsArray = {
367
+ hitType : 'event',
368
+ eventCategory : internal_label,
369
+ eventAction : link,
370
+ eventLabel : valuesArray.title,
371
+ hitCallback : __gaTrackerHitBack,
372
+ };
373
 
374
  if ( navigator.sendBeacon ) {
375
  fieldsArray.transport = 'beacon';
388
  }
389
  }
390
 
391
+ fieldsArray = {
392
+ hitType = 'event',
393
+ eventCategory = 'outbound-link',
394
+ eventAction = link,
395
+ eventLabel = valuesArray.title,
396
+ hitCallback = __gaTrackerHitBack,
397
+ };
398
 
399
  if ( navigator.sendBeacon ) {
400
  fieldsArray.transport = 'beacon';
assets/js/frontend.min.js CHANGED
@@ -1,5 +1,5 @@
1
  ;var MonsterInsights=function(){var e=[];this.setLastClicked=function(t,n,i){t=typeof t!=='undefined'?t:[];n=typeof n!=='undefined'?n:[];i=typeof i!=='undefined'?i:!1;e.valuesArray=t;e.fieldsArray=n};this.getLastClicked=function(){return e};function a(){if(monsterinsights_frontend.is_debug_mode==='true'||window.monsterinsights_debug_mode){return!0}
2
- else{return!1}};function t(t,n){t=typeof t!=='undefined'?t:[];n=typeof n!=='undefined'?n:[];if(n.length>0){__gaTracker('send',n)};e.valuesArray=t;e.fieldsArray=n;e.tracked=!0;o('Tracked: '+t.type);o(e)};function i(t){t=typeof t!=='undefined'?t:[];e.valuesArray=t;e.fieldsArray=[];e.tracked=!1;o('Not Tracked: '+t.exit);o(e)};function o(e){if(a()){console.dir(e)}};function r(e){return e.replace(/^\s+|\s+$/gm,'')};function l(){var n=0,e=document.domain,i=e.split('.'),t='_gd'+(new Date()).getTime();while(n<(i.length-1)&&document.cookie.indexOf(t+'='+t)==-1){e=i.slice(-1-(++n)).join('.');document.cookie=t+'='+t+';domain='+e+';'};document.cookie=t+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain='+e+';';return e};function s(e){e=e.substring(0,(e.indexOf('#')==-1)?e.length:e.indexOf('#'));e=e.substring(0,(e.indexOf('?')==-1)?e.length:e.indexOf('?'));e=e.substring(e.lastIndexOf('/')+1,e.length);e=e.substring(e.indexOf('.')+1);return e};function f(){return __gaTracker.hasOwnProperty('loaded')&&__gaTracker.loaded==!0};function v(){return event.which==1||event.which==2||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey};function h(){var e=[];if(typeof monsterinsights_frontend.download_extensions=='string'){e=monsterinsights_frontend.download_extensions.split(',')};return e};function d(){var e=[];if(typeof monsterinsights_frontend.inbound_paths=='string'){e=monsterinsights_frontend.inbound_paths.split(',')};return e};function g(){if(event.which==1){return'event.which=1'}
3
  else if(event.which==2){return'event.which=2'}
4
  else if(event.metaKey){return'metaKey'}
5
  else if(event.ctrlKey){return'ctrlKey'}
@@ -9,20 +9,20 @@ else{return''}};function p(e){var i=h(),a=d(),n='internal',f=e.href,g=s(e.href),
9
  else if(r(v)=='mailto'||r(v)=='mailto:'){n='mailto'}
10
  else if(i.length>0&&g.length>0){for(t=0,o=i.length;t<o;++t){if(i[t].length>0&&f.endsWith(i[t])){n='download';break}}}
11
  else if(c.length>0&&u.length>0&&!c.endsWith(u)){n='external'}
12
- else{for(t=0,o=a.length;t<o;++t){if(a[t].length>0&&p.startsWith(a[t])){n='internal-as-outbound';break}}};return n};function y(e,t){var n=(e.target&&!e.target.match(/^_(self|parent|top)$/i))?e.target:!1;if(t.ctrlKey||t.shiftKey||t.metaKey||t.which==2){n='_blank'};return n};function u(o){var r=o.srcElement||o.target,e=[],n=[];e.el=r;e.ga_loaded=f();e.click_type=g();if(!f()||!v()){e.exit='loaded';i(e);return}
13
- while(r&&(typeof r.tagName=='undefined'||r.tagName.toLowerCase()!='a'||!r.href)){r=r.parentNode};if(r&&r.href){var c=r.href,C=s(r.href),K=h(),L=d(),O=monsterinsights_frontend.home_url,b=monsterinsights_frontend.track_download_as,w='outbound-link-'+monsterinsights_frontend.internal_label,E=l(),u=p(r),x=y(r,o);e.el=r;e.el_href=r.href;e.el_protocol=r.protocol;e.el_hostname=r.hostname;e.el_port=r.port;e.el_pathname=r.pathname;e.el_search=r.search;e.el_hash=r.hash;e.el_host=r.host;e.debug_mode=a();e.download_extensions=K;e.inbound_paths=L;e.home_url=O;e.track_download_as=b;e.internal_label=w;e.link=c;e.extension=C;e.type=u;e.target=x;e.title=r.title||r.textContent||r.innerText;if(u!=='internal'&&u!=='javascript'){var k=!1,m=function(){if(k){return};k=!0;window.location.href=c},T=function(){e.exit='external';i(e)},A=function(){e.exit='internal-as-outbound';i(e)};if(x||u=='mailto'){if(u=='download'){if(b=='pageview'){n.hitType='pageview';n.page=c;t(e,n)}
14
- else{n.hitType='event';n.eventCategory='download';n.eventAction=c;n.eventLabel=e.title;t(e,n)}}
15
- else if(u=='mailto'){n.hitType='event';n.eventCategory='mailto';n.eventAction=c;n.eventLabel=e.title;t(e,n)}
16
- else if(u=='internal-as-outbound'){n.hitType='event';n.eventCategory=w;n.eventAction=c;n.eventLabel=e.title;t(e,n)}
17
- else if(u=='external'){n.hitType='event';n.eventCategory='outbound-link';n.eventAction=c;n.eventLabel=e.title;t(e,n)}
18
  else{e.exit='type';i(e)}}
19
- else{if(u!='external'&&u!='internal-as-outbound'){if(!o.defaultPrevented){if(o.preventDefault){o.preventDefault()}
20
- else{o.returnValue=!1}}};if(u=='download'){if(b=='pageview'){n.hitType='pageview';n.page=c;n.hitCallback=m;t(e,n)}
21
- else{n.hitType='event';n.eventCategory='download';n.eventAction=c;n.eventLabel=e.title;n.hitCallback=m;t(e,n)}}
22
- else if(u=='internal-as-outbound'){window.onbeforeunload=function(i){if(!o.defaultPrevented){if(o.preventDefault){o.preventDefault()}
23
- else{o.returnValue=!1}};n.hitType='event';n.eventCategory=w;n.eventAction=c;n.eventLabel=e.title;n.hitCallback=m;if(navigator.sendBeacon){n.transport='beacon'};t(e,n);setTimeout(m,1000)}}
24
- else if(u=='external'){window.onbeforeunload=function(i){if(!o.defaultPrevented){if(o.preventDefault){o.preventDefault()}
25
- else{o.returnValue=!1}};n.hitType='event';n.eventCategory='outbound-link';n.eventAction=c;n.eventLabel=e.title;n.hitCallback=m;if(navigator.sendBeacon){n.transport='beacon'};t(e,n);setTimeout(m,1000)}}
26
  else{e.exit='type';i(e)};if(u!='external'&&u!='internal-as-outbound'){setTimeout(m,1000)}
27
  else{if(u=='external'){setTimeout(T,1100)}
28
  else{setTimeout(A,1100)}}}}}
1
  ;var MonsterInsights=function(){var e=[];this.setLastClicked=function(t,n,i){t=typeof t!=='undefined'?t:[];n=typeof n!=='undefined'?n:[];i=typeof i!=='undefined'?i:!1;e.valuesArray=t;e.fieldsArray=n};this.getLastClicked=function(){return e};function a(){if(monsterinsights_frontend.is_debug_mode==='true'||window.monsterinsights_debug_mode){return!0}
2
+ else{return!1}};function m(e){var n={};for(var t=0;t<e.length;++t)n[t]=e[t];return n};function t(t,n){t=typeof t!=='undefined'?t:[];n=typeof n!=='undefined'?n:{};__gaTracker('send',n);e.valuesArray=t;e.fieldsArray=n;e.tracked=!0;o('Tracked: '+t.type);o(e)};function i(t){t=typeof t!=='undefined'?t:[];e.valuesArray=t;e.fieldsArray=[];e.tracked=!1;o('Not Tracked: '+t.exit);o(e)};function o(e){if(a()){console.dir(e)}};function r(e){return e.replace(/^\s+|\s+$/gm,'')};function l(){var n=0,e=document.domain,i=e.split('.'),t='_gd'+(new Date()).getTime();while(n<(i.length-1)&&document.cookie.indexOf(t+'='+t)==-1){e=i.slice(-1-(++n)).join('.');document.cookie=t+'='+t+';domain='+e+';'};document.cookie=t+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain='+e+';';return e};function s(e){e=e.substring(0,(e.indexOf('#')==-1)?e.length:e.indexOf('#'));e=e.substring(0,(e.indexOf('?')==-1)?e.length:e.indexOf('?'));e=e.substring(e.lastIndexOf('/')+1,e.length);e=e.substring(e.indexOf('.')+1);return e};function f(){return __gaTracker.hasOwnProperty('loaded')&&__gaTracker.loaded==!0};function v(){return event.which==1||event.which==2||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey};function h(){var e=[];if(typeof monsterinsights_frontend.download_extensions=='string'){e=monsterinsights_frontend.download_extensions.split(',')};return e};function d(){var e=[];if(typeof monsterinsights_frontend.inbound_paths=='string'){e=monsterinsights_frontend.inbound_paths.split(',')};return e};function g(){if(event.which==1){return'event.which=1'}
3
  else if(event.which==2){return'event.which=2'}
4
  else if(event.metaKey){return'metaKey'}
5
  else if(event.ctrlKey){return'ctrlKey'}
9
  else if(r(v)=='mailto'||r(v)=='mailto:'){n='mailto'}
10
  else if(i.length>0&&g.length>0){for(t=0,o=i.length;t<o;++t){if(i[t].length>0&&f.endsWith(i[t])){n='download';break}}}
11
  else if(c.length>0&&u.length>0&&!c.endsWith(u)){n='external'}
12
+ else{for(t=0,o=a.length;t<o;++t){if(a[t].length>0&&p.startsWith(a[t])){n='internal-as-outbound';break}}};return n};function y(e,t){var n=(e.target&&!e.target.match(/^_(self|parent|top)$/i))?e.target:!1;if(t.ctrlKey||t.shiftKey||t.metaKey||t.which==2){n='_blank'};return n};function u(n){var o=n.srcElement||n.target,e=[],r=[];e.el=o;e.ga_loaded=f();e.click_type=g();if(!f()||!v()){e.exit='loaded';i(e);return}
13
+ while(o&&(typeof o.tagName=='undefined'||o.tagName.toLowerCase()!='a'||!o.href)){o=o.parentNode};if(o&&o.href){var c=o.href,C=s(o.href),K=h(),L=d(),O=monsterinsights_frontend.home_url,b=monsterinsights_frontend.track_download_as,w='outbound-link-'+monsterinsights_frontend.internal_label,E=l(),u=p(o),x=y(o,n);e.el=o;e.el_href=o.href;e.el_protocol=o.protocol;e.el_hostname=o.hostname;e.el_port=o.port;e.el_pathname=o.pathname;e.el_search=o.search;e.el_hash=o.hash;e.el_host=o.host;e.debug_mode=a();e.download_extensions=K;e.inbound_paths=L;e.home_url=O;e.track_download_as=b;e.internal_label=w;e.link=c;e.extension=C;e.type=u;e.target=x;e.title=o.title||o.textContent||o.innerText;if(u!=='internal'&&u!=='javascript'){var k=!1,m=function(){if(k){return};k=!0;window.location.href=c},T=function(){e.exit='external';i(e)},A=function(){e.exit='internal-as-outbound';i(e)};if(x||u=='mailto'){if(u=='download'){if(b=='pageview'){r={hitType:'pageview',page:c,};t(e,r)}
14
+ else{r={hitType:'event',eventCategory:'download',eventAction:c,eventLabel:e.title,};t(e,r)}}
15
+ else if(u=='mailto'){r={hitType:'event',eventCategory:'mailto',eventAction:c,eventLabel:e.title,};t(e,r)}
16
+ else if(u=='internal-as-outbound'){r={hitType:'event',eventCategory:w,eventAction:c,eventLabel:e.title,};t(e,r)}
17
+ else if(u=='external'){r={hitType:'event',eventCategory:'outbound-link',eventAction:c,eventLabel:e.title,};t(e,r)}
18
  else{e.exit='type';i(e)}}
19
+ else{if(u!='external'&&u!='internal-as-outbound'){if(!n.defaultPrevented){if(n.preventDefault){n.preventDefault()}
20
+ else{n.returnValue=!1}}};if(u=='download'){if(b=='pageview'){r={hitType:'pageview',page:c,hitCallback:m,};t(e,r)}
21
+ else{r={hitType:'event',eventCategory:'download',eventAction:c,eventLabel:e.title,hitCallback:m,};t(e,r)}}
22
+ else if(u=='internal-as-outbound'){window.onbeforeunload=function(i){if(!n.defaultPrevented){if(n.preventDefault){n.preventDefault()}
23
+ else{n.returnValue=!1}};r={hitType:'event',eventCategory:w,eventAction:c,eventLabel:e.title,hitCallback:m,};if(navigator.sendBeacon){r.transport='beacon'};t(e,r);setTimeout(m,1000)}}
24
+ else if(u=='external'){window.onbeforeunload=function(i){if(!n.defaultPrevented){if(n.preventDefault){n.preventDefault()}
25
+ else{n.returnValue=!1}};r={hitType='event',eventCategory='outbound-link',eventAction=c,eventLabel=e.title,hitCallback=m,};if(navigator.sendBeacon){r.transport='beacon'};t(e,r);setTimeout(m,1000)}}
26
  else{e.exit='type';i(e)};if(u!='external'&&u!='internal-as-outbound'){setTimeout(m,1000)}
27
  else{if(u=='external'){setTimeout(T,1100)}
28
  else{setTimeout(A,1100)}}}}}
googleanalytics.php CHANGED
@@ -6,7 +6,7 @@
6
  * Author: MonsterInsights
7
  * Author URI: https://www.monsterinsights.com/
8
  *
9
- * Version: 6.1.3
10
  * Requires at least: 3.9.0
11
  * Tested up to: 4.7.4
12
  *
@@ -69,7 +69,7 @@ final class MonsterInsights_Lite {
69
  * @access public
70
  * @var string $version Plugin version.
71
  */
72
- public $version = '6.1.3';
73
 
74
  /**
75
  * Plugin file.
6
  * Author: MonsterInsights
7
  * Author URI: https://www.monsterinsights.com/
8
  *
9
+ * Version: 6.1.4
10
  * Requires at least: 3.9.0
11
  * Tested up to: 4.7.4
12
  *
69
  * @access public
70
  * @var string $version Plugin version.
71
  */
72
+ public $version = '6.1.4';
73
 
74
  /**
75
  * Plugin file.
includes/frontend/events/class-events-js.php CHANGED
@@ -54,7 +54,7 @@ class MonsterInsights_Events_JS {
54
  */
55
  public function __construct() {
56
  $this->base = MonsterInsights();
57
- $tracking = monsterinsights_get_option( 'tracking_mode', false );
58
  $events = monsterinsights_get_option( 'events_mode', false );
59
  if ( $events === 'js' && $tracking === 'analytics' ) {
60
  add_action( 'wp_enqueue_scripts', array( $this, 'output_javascript' ), 9 );
54
  */
55
  public function __construct() {
56
  $this->base = MonsterInsights();
57
+ $tracking = monsterinsights_get_option( 'tracking_mode', 'analytics' );
58
  $events = monsterinsights_get_option( 'events_mode', false );
59
  if ( $events === 'js' && $tracking === 'analytics' ) {
60
  add_action( 'wp_enqueue_scripts', array( $this, 'output_javascript' ), 9 );
includes/frontend/frontend.php CHANGED
@@ -97,7 +97,7 @@ add_action( 'wp_head', 'monsterinsights_tracking_script', 8 );
97
  */
98
  function monsterinsights_events_tracking( ) {
99
  $events_mode = monsterinsights_get_option( 'events_mode', false );
100
- $tracking_mode = monsterinsights_get_option( 'tracking_mode', false );
101
  $disabled_user = monsterinsights_disabled_user_group();
102
 
103
  if ( ! $disabled_user && $events_mode === 'php' && ( $tracking_mode === 'ga' || $tracking_mode === 'analytics' ) ) {
97
  */
98
  function monsterinsights_events_tracking( ) {
99
  $events_mode = monsterinsights_get_option( 'events_mode', false );
100
+ $tracking_mode = monsterinsights_get_option( 'tracking_mode', 'analytics' );
101
  $disabled_user = monsterinsights_disabled_user_group();
102
 
103
  if ( ! $disabled_user && $events_mode === 'php' && ( $tracking_mode === 'ga' || $tracking_mode === 'analytics' ) ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.wpbeginner.com/wpbeginner-needs-your-help/
4
  Tags: analytics, analytics dashboard, google analytics, google analytics dashboard, google analytics widget, universal google analytics, statistics, tracking, stats, google, yoast, google analytics by yoast, ga, monster insights, monsterinsights, universal analytics, web stats, ecommerce, ecommerce tracking
5
  Requires at least: 3.9
6
  Tested up to: 4.7.4
7
- Stable tag: 6.1.3
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.
@@ -136,6 +136,10 @@ You can also learn about other <a href="http://www.wpbeginner.com/category/plugi
136
  4. Want more features? <a href="https://www.monsterinsights.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion">Purchase MonsterInsights Pro</a>!
137
 
138
  == Changelog ==
 
 
 
 
139
  = 6.1.1 - 6.1.3 (depending on which version of MI you have), March 22, 2017 =
140
  * Bugfix: (pro users) Issue with JS events throwing an error for array on non-set settings.
141
 
4
  Tags: analytics, analytics dashboard, google analytics, google analytics dashboard, google analytics widget, universal google analytics, statistics, tracking, stats, google, yoast, google analytics by yoast, ga, monster insights, monsterinsights, universal analytics, web stats, ecommerce, ecommerce tracking
5
  Requires at least: 3.9
6
  Tested up to: 4.7.4
7
+ Stable tag: 6.1.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.
136
  4. Want more features? <a href="https://www.monsterinsights.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion">Purchase MonsterInsights Pro</a>!
137
 
138
  == Changelog ==
139
+ = 6.1.4, March 23, 2017 =
140
+ * Tweak: JS events tracking for click events.
141
+ * Bugfix: Edge case where JS events tracking won't turn on if the main tracking setting was disabled (such as faulty import).
142
+
143
  = 6.1.1 - 6.1.3 (depending on which version of MI you have), March 22, 2017 =
144
  * Bugfix: (pro users) Issue with JS events throwing an error for array on non-set settings.
145