Google Analytics for WordPress by MonsterInsights - Version 7.0.1

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 Icon 128x128 Google Analytics for WordPress by MonsterInsights
Version 7.0.1
Comparing to
See all releases

Code changes from version 7.0.0 to 7.0.1

assets/js/admin.js CHANGED
@@ -21,10 +21,10 @@
21
  errors[ errors.length ] = [errorMsg, url, lineNumber];
22
  else
23
  dbjsError(errorMsg, url, lineNumber);
24
- }
25
 
26
  jQuery(document).ready( function(){
27
- for ( err in errors )
28
  dbjsError( errors[err][0], errors[err][1], errors[err][2] );
29
 
30
  });
@@ -53,6 +53,15 @@
53
  })();
54
 
55
  jQuery( document ).ready( function( $ ) {
 
 
 
 
 
 
 
 
 
56
  jQuery("#screen-meta-links").prependTo("#monsterinsights-header-temp");
57
  jQuery("#screen-meta").prependTo("#monsterinsights-header-temp");
58
 
@@ -206,7 +215,7 @@ jQuery( document ).ready( function( $ ) {
206
  allowEscapeKey: false,
207
  allowEnterKey: false,
208
  onOpen: function () {
209
- swal.showLoading()
210
  }
211
  }).catch(swal.noop);
212
  var data = {
@@ -248,7 +257,7 @@ jQuery( document ).ready( function( $ ) {
248
  allowEscapeKey: false,
249
  allowEnterKey: false,
250
  onOpen: function () {
251
- swal.showLoading()
252
  }
253
  }).catch(swal.noop);
254
  var data = {
@@ -290,7 +299,7 @@ jQuery( document ).ready( function( $ ) {
290
  allowEscapeKey: false,
291
  allowEnterKey: false,
292
  onOpen: function () {
293
- swal.showLoading()
294
  }
295
  }).catch(swal.noop);
296
  var data = {
@@ -347,7 +356,7 @@ jQuery( document ).ready( function( $ ) {
347
  allowEscapeKey: false,
348
  allowEnterKey: false,
349
  onOpen: function () {
350
- swal.showLoading()
351
  }
352
  }).catch(swal.noop);
353
  var data = {
@@ -423,16 +432,16 @@ jQuery( document ).ready( function( $ ) {
423
  var html = domain + fragment + 'utm_source=' + encodeURIComponent(source);
424
 
425
  if (medium) {
426
- var html = html + '&utm_medium=' + encodeURIComponent(medium);
427
  }
428
  if (name) {
429
- var html = html + '&utm_campaign=' + encodeURIComponent(name);
430
  }
431
  if (term) {
432
- var html = html + '&utm_term=' + encodeURIComponent(term);
433
  }
434
  if (content) {
435
- var html = html + '&utm_content=' + encodeURIComponent(content);
436
  }
437
 
438
 
@@ -616,7 +625,7 @@ jQuery( document ).ready( function( $ ) {
616
  $this.next().hide();
617
  return;
618
  }
619
- }
620
  $.ajax(opts);
621
  });
622
 
@@ -683,7 +692,7 @@ jQuery( document ).ready( function( $ ) {
683
  $this.next().hide();
684
  return;
685
  }
686
- }
687
  $.ajax(opts);
688
  });
689
 
@@ -813,7 +822,7 @@ jQuery( document ).ready( function( $ ) {
813
  $this.next().hide();
814
  return;
815
  }
816
- }
817
  $.ajax(cred_opts);
818
  });
819
 
@@ -846,7 +855,7 @@ jQuery( document ).ready( function( $ ) {
846
  $this.next().hide();
847
  return;
848
  }
849
- }
850
  $.ajax(opts);
851
  });
852
 
@@ -1041,7 +1050,7 @@ jQuery(document).ready(function($) {
1041
  observer.observe(this, options);
1042
  });
1043
  }
1044
- }
1045
 
1046
  jQuery('#monsterinsights-reports-page-main-nav .monsterinsights-main-nav-item.monsterinsights-nav-item').attrchange(function(attrName) {
1047
  if ( attrName != 'class' ){
21
  errors[ errors.length ] = [errorMsg, url, lineNumber];
22
  else
23
  dbjsError(errorMsg, url, lineNumber);
24
+ };
25
 
26
  jQuery(document).ready( function(){
27
+ for ( var err in errors )
28
  dbjsError( errors[err][0], errors[err][1], errors[err][2] );
29
 
30
  });
53
  })();
54
 
55
  jQuery( document ).ready( function( $ ) {
56
+ // Disable function
57
+ jQuery.fn.extend({
58
+ disable: function(state) {
59
+ return this.each(function() {
60
+ this.disabled = state;
61
+ });
62
+ }
63
+ });
64
+
65
  jQuery("#screen-meta-links").prependTo("#monsterinsights-header-temp");
66
  jQuery("#screen-meta").prependTo("#monsterinsights-header-temp");
67
 
215
  allowEscapeKey: false,
216
  allowEnterKey: false,
217
  onOpen: function () {
218
+ swal.showLoading();
219
  }
220
  }).catch(swal.noop);
221
  var data = {
257
  allowEscapeKey: false,
258
  allowEnterKey: false,
259
  onOpen: function () {
260
+ swal.showLoading();
261
  }
262
  }).catch(swal.noop);
263
  var data = {
299
  allowEscapeKey: false,
300
  allowEnterKey: false,
301
  onOpen: function () {
302
+ swal.showLoading();
303
  }
304
  }).catch(swal.noop);
305
  var data = {
356
  allowEscapeKey: false,
357
  allowEnterKey: false,
358
  onOpen: function () {
359
+ swal.showLoading();
360
  }
361
  }).catch(swal.noop);
362
  var data = {
432
  var html = domain + fragment + 'utm_source=' + encodeURIComponent(source);
433
 
434
  if (medium) {
435
+ html = html + '&utm_medium=' + encodeURIComponent(medium);
436
  }
437
  if (name) {
438
+ html = html + '&utm_campaign=' + encodeURIComponent(name);
439
  }
440
  if (term) {
441
+ html = html + '&utm_term=' + encodeURIComponent(term);
442
  }
443
  if (content) {
444
+ html = html + '&utm_content=' + encodeURIComponent(content);
445
  }
446
 
447
 
625
  $this.next().hide();
626
  return;
627
  }
628
+ };
629
  $.ajax(opts);
630
  });
631
 
692
  $this.next().hide();
693
  return;
694
  }
695
+ };
696
  $.ajax(opts);
697
  });
698
 
822
  $this.next().hide();
823
  return;
824
  }
825
+ };
826
  $.ajax(cred_opts);
827
  });
828
 
855
  $this.next().hide();
856
  return;
857
  }
858
+ };
859
  $.ajax(opts);
860
  });
861
 
1050
  observer.observe(this, options);
1051
  });
1052
  }
1053
+ };
1054
 
1055
  jQuery('#monsterinsights-reports-page-main-nav .monsterinsights-main-nav-item.monsterinsights-nav-item').attrchange(function(attrName) {
1056
  if ( attrName != 'class' ){
assets/js/admin.min.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(){var e,n,t=[];window.onerror=function(e,s,i){if(!document.getElementById('monsterinsights-ublock-origin-error'))t[t.length]=[e,s,i];else n(e,s,i)};jQuery(document).ready(function(){for(err in t)n(t[err][0],t[err][1],t[err][2])});n=function(t,n,s){var i,r,o,a;if(!e)e=document.getElementById('monsterinsights-ublock-origin-error');if(!e)return;i=document.createElement('li');i.className='debug-bar-js-error';i.textContent=t+' on ';r=document.createElement('span');r.textContent=n+' line '+s;i.appendChild(r);e.appendChild(i)}})();jQuery(document).ready(function(t){jQuery('#screen-meta-links').prependTo('#monsterinsights-header-temp');jQuery('#screen-meta').prependTo('#monsterinsights-header-temp');jQuery('.monsterinsights-help-tip').tooltip({content:function(){return jQuery(this).prop('title')},tooltipClass:'monsterinsights-ui-tooltip',position:{my:'center top',at:'center bottom+10',collision:'flipfit',},hide:{duration:200,},show:{duration:200,},});jQuery('body').tooltip({selector:'.monsterinsights-reports-uright-tooltip',items:'[data-tooltip-title], [data-tooltip-description]',content:function(){return'<div class="monsterinsights-reports-tooltip-title">'+jQuery(this).data('tooltip-title')+'</div><div class="monsterinsights-reports-tooltip-content">'+jQuery(this).data('tooltip-description')+'</div>'},tooltipClass:'monsterinsights-reports-ui-tooltip',position:{my:'right-10 top',at:'left top',collision:'flipfit'},hide:{duration:200},show:{duration:200},});if(typeof Clipboard!=='undefined'){var i=new Clipboard('.monsterinsights-copy-to-clipboard');jQuery(document).on('click','.monsterinsights-copy-to-clipboard',function(t){t.preventDefault()});function m(t){var e='',n=(t==='cut'?'X':'C');if(/iPhone|iPad/i.test(navigator.userAgent)){e='No support :('}
2
  else if(/Mac/i.test(navigator.userAgent)){e='Press ⌘-'+n+' to '+t}
3
  else{e='Press Ctrl-'+n+' to '+t};return e};i.on('success',function(t){t.trigger.textContent=monsterinsights_admin.copied;window.setTimeout(function(){t.trigger.textContent=monsterinsights_admin.copytoclip},2000)});i.on('error',function(t){t.trigger.textContent=m(t.action)})};function r(e,n){n.parentText=n.parentText||'';if(jQuery.trim(e.term)===''){return n};if(n.children&&n.children.length>0){var i=t.extend(!0,{},n);for(var s=n.children.length-1;s>=0;s--){var o=n.children[s];o.parentText+=n.parentText+' '+n.text;var d=r(e,o);if(d==null){i.children.splice(s,1)}};if(i.children.length>0){return i};return r(e,i)};var a=(n.parentText+' '+n.text).toUpperCase(),l=e.term.toUpperCase();if(a.indexOf(l)>-1){return n};return null};jQuery('.monsterinsights-select300').select300();var e=!1;jQuery(document).on('change','#monsterinsights-settings :input',function(){e=!0});jQuery(document).on('click','a:not(.monsterinsights-settings-click-excluded)',function(t){if(e){var n=confirm(monsterinsights_admin.settings_changed_confirm);if(n){e=!1;return!0}
4
  else{t.preventDefault();return!1}}});jQuery('#monsterinsights-google-authenticate-submit').on('click',function(t){t.preventDefault();swal({type:'info',title:monsterinsights_admin.redirect_loading_title_text,text:monsterinsights_admin.redirect_loading_text_text,allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,onOpen:function(){swal.showLoading()}}).catch(swal.noop);var e={'action':'monsterinsights_maybe_authenticate','nonce':monsterinsights_admin.admin_nonce,'isnetwork':monsterinsights_admin.isnetwork};jQuery.post(ajaxurl,e,function(t){if(t.success){window.location=t.data.redirect}
@@ -7,7 +7,7 @@ else{swal({type:'error',title:monsterinsights_admin.redirect_loading_error_title
7
  else{swal({type:'error',title:monsterinsights_admin.verify_loading_error_title,text:t.data.message,confirmButtonText:monsterinsights_admin.ok_text,}).catch(swal.noop)}}).fail(function(t,e,n){var s=jQuery(t.responseText).text();s=s.substring(0,s.indexOf('Call Stack'));swal({type:'error',title:monsterinsights_admin.verify_loading_error_title,text:s,confirmButtonText:monsterinsights_admin.ok_text,}).catch(swal.noop)})});jQuery(document).on('click','#monsterinsights-google-deauthenticate-submit',function(e){e.preventDefault();o(t(this),!1)});jQuery(document).on('click','#monsterinsights-google-force-deauthenticate-submit',function(e){e.preventDefault();o(t(this),!0)});function o(t,e){swal({type:'info',title:monsterinsights_admin.deauth_loading_title_text,text:monsterinsights_admin.deauth_loading_text_text,allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,onOpen:function(){swal.showLoading()}}).catch(swal.noop);var n={'action':'monsterinsights_maybe_delete','nonce':monsterinsights_admin.admin_nonce,'isnetwork':monsterinsights_admin.isnetwork,'forcedelete':e.toString(),};jQuery.post(ajaxurl,n,function(n){if(n.success){swal({type:'success',title:monsterinsights_admin.deauth_success_title_text,text:monsterinsights_admin.deauth_success_text_text,confirmButtonText:monsterinsights_admin.ok_text,allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,}).then(function(){location.reload()}).catch(swal.noop)}
8
  else{if(!e){t.attr('name','monsterinsights-google-force-deauthenticate-submit');t.attr('id','monsterinsights-google-force-deauthenticate-submit');t.attr('value',monsterinsights_admin.force_deauth_button_text)};swal({type:'error',title:monsterinsights_admin.deauth_loading_error_title,text:n.data.message,confirmButtonText:monsterinsights_admin.ok_text,}).catch(swal.noop)}}).fail(function(t,e,n){var s=jQuery(t.responseText).text();s=s.substring(0,s.indexOf('Call Stack'));swal({type:'error',title:monsterinsights_admin.deauth_loading_error_title,text:s,confirmButtonText:monsterinsights_admin.ok_text,}).catch(swal.noop)})};jQuery('#monsterinsights-url-builder input').keyup(a);jQuery('#monsterinsights-url-builder input').click(a);function a(){var n=jQuery('#monsterinsights-url-builer-domain').val().trim(),i=jQuery('#monsterinsights-url-builer-source').val().trim(),r=jQuery('#monsterinsights-url-builer-medium').val().trim(),o=jQuery('#monsterinsights-url-builer-term').val().trim(),a=jQuery('#monsterinsights-url-builer-content').val().trim(),l=jQuery('#monsterinsights-url-builer-name').val().trim(),e=jQuery('#monsterinsights-url-builer-fragment').is(':checked'),s=n.substring(n.lastIndexOf('/')+1);if(e&&s.length>0&&s.indexOf('#')>-1){e='&'}
9
  else if(!e&&s.length>0&&s.indexOf('?')>-1){e='&'}
10
- else{e=e?'#':'?'};var t=n+e+'utm_source='+encodeURIComponent(i);if(r){var t=t+'&utm_medium='+encodeURIComponent(r)};if(l){var t=t+'&utm_campaign='+encodeURIComponent(l)};if(o){var t=t+'&utm_term='+encodeURIComponent(o)};if(a){var t=t+'&utm_content='+encodeURIComponent(a)};if(n&&i){jQuery('#monsterinsights-url-builer-url').html(t.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'))}
11
  else{jQuery('#monsterinsights-url-builer-url').html('')}};jQuery(document).on('click','#monsterinsights-shorten-url',function(t){t.preventDefault();jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.working);var e=decodeURIComponent(jQuery('#monsterinsights-url-builer-url').val()),n={'action':'monsterinsights_get_shortlink','url':e,'nonce':monsterinsights_admin.admin_nonce,};jQuery.post(ajaxurl,n,function(t){jQuery('#monsterinsights-url-builer-url').html(t.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'));jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.shortened);window.setTimeout(function(){jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.shorten)},2000)}).fail(function(t,e,n){jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.failed);window.setTimeout(function(){jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.shorten)},2000)})});if(jQuery('#monsterinsights-addons').length!==0){jQuery('#wpbody').css('background-color','#f1f1f1');jQuery('body').css('background-color','#f1f1f1');jQuery('#wpfooter').css('background-color','#f1f1f1');jQuery('#wpbody-content').css('padding-bottom','0px')};var d;jQuery('form#add-on-search input#add-on-searchbox').on('keyup',function(){clearTimeout(d);var t=jQuery(this),e=jQuery(t).val().toLowerCase(),n=jQuery(t).data('heading'),s=jQuery(t).data('results'),i=jQuery(t).data('cancel');jQuery('form#add-on-search .spinner').css('visibility','visible');if(e.length<3){jQuery('div.monsterinsights-addon').fadeIn('fast',function(){jQuery('form#add-on-search .spinner').css('visibility','hidden')});return};jQuery('div.monsterinsights-addon').each(function(){if(jQuery('h3.monsterinsights-addon-title',jQuery(this)).text().toLowerCase().search(e)>=0){jQuery(this).fadeIn()}
12
  else{jQuery(this).fadeOut()}});jQuery('form#add-on-search .spinner').css('visibility','hidden')});var s=new List('monsterinsights-addons-licensed',{valueNames:['monsterinsights-addon-title']});var n=new List('monsterinsights-addons-unlicensed',{valueNames:['monsterinsights-addon-title']});jQuery('select#monsterinsights-filter-select').on('change',function(){if(typeof s.sort!=='undefined'){s.sort('monsterinsights-addon-title',{order:jQuery(this).val(),})};if(typeof n.sort!=='undefined'){n.sort('monsterinsights-addon-title',{order:jQuery(this).val(),})}});jQuery('#monsterinsights-addons').on('click.refreshInstallAddon','.monsterinsights-addon-action-button',function(e){var n=jQuery(this),s=jQuery('#monsterinsights-addons').find('.monsterinsights-addon-action-button');t.each(s,function(t,e){if(n==e){return!0};u(e)})});jQuery('#monsterinsights-addons').on('click.activateAddon','.monsterinsights-activate-addon',function(e){e.preventDefault();var n=jQuery(this);jQuery('.monsterinsights-addon-error').remove();jQuery(this).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.activating);jQuery(this).next().css({'display':'inline-block','margin-top':'0px'});var s=jQuery(this),o=jQuery(this).attr('rel'),i=jQuery(this).parent().parent(),r=jQuery(this).parent().parent().find('.addon-status'),a={url:ajaxurl,type:'post',async:!0,cache:!1,dataType:'json',data:{action:'monsterinsights_activate_addon',nonce:monsterinsights_admin.activate_nonce,plugin:o,isnetwork:monsterinsights_admin.isnetwork},success:function(t){if(t&&!0!==t){jQuery(i).slideDown('normal',function(){jQuery(this).after('<div class="monsterinsights-addon-error"><strong>'+t.error+'</strong></div>');n.next().hide();jQuery('.monsterinsights-addon-error').delay(3000).slideUp()});return};if(monsterinsights_admin.isnetwork){jQuery(s).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.networkdeactivate).removeClass('monsterinsights-activate-addon').addClass('monsterinsights-deactivate-addon')}
13
  else{jQuery(s).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.deactivate).removeClass('monsterinsights-activate-addon').addClass('monsterinsights-deactivate-addon')};jQuery(r).text(monsterinsights_admin.active);var o=jQuery(r),e,a,l;e=o.html().split(/\s+/);a=e.pop();l=e.join(' ');o.html([l,' <span>',a,'</span>'].join(''));jQuery(i).removeClass('monsterinsights-addon-inactive').addClass('monsterinsights-addon-active');n.next().hide()},error:function(t,e,s){n.next().hide();return}};t.ajax(a)});jQuery('#monsterinsights-addons').on('click.deactivateAddon','.monsterinsights-deactivate-addon',function(e){e.preventDefault();var n=jQuery(this);jQuery('.monsterinsights-addon-error').remove();jQuery(this).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.deactivating);jQuery(this).next().css({'display':'inline-block','margin-top':'0px'});var s=jQuery(this),o=jQuery(this).attr('rel'),i=jQuery(this).parent().parent(),r=jQuery(this).parent().parent().find('.addon-status'),a={url:ajaxurl,type:'post',async:!0,cache:!1,dataType:'json',data:{action:'monsterinsights_deactivate_addon',nonce:monsterinsights_admin.deactivate_nonce,plugin:o,isnetwork:monsterinsights_admin.isnetwork},success:function(t){if(t&&!0!==t){jQuery(i).slideDown('normal',function(){jQuery(this).after('<div class="monsterinsights-addon-error"><strong>'+t.error+'</strong></div>');n.next().hide();jQuery('.monsterinsights-addon-error').delay(3000).slideUp()});return};if(monsterinsights_admin.isnetwork){jQuery(s).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.networkactivate).removeClass('monsterinsights-deactivate-addon').addClass('monsterinsights-activate-addon')}
1
+ (function(){var e,n,t=[];window.onerror=function(e,s,i){if(!document.getElementById('monsterinsights-ublock-origin-error'))t[t.length]=[e,s,i];else n(e,s,i)};jQuery(document).ready(function(){for(var e in t)n(t[e][0],t[e][1],t[e][2])});n=function(t,n,s){var i,r,o,a;if(!e)e=document.getElementById('monsterinsights-ublock-origin-error');if(!e)return;i=document.createElement('li');i.className='debug-bar-js-error';i.textContent=t+' on ';r=document.createElement('span');r.textContent=n+' line '+s;i.appendChild(r);e.appendChild(i)}})();jQuery(document).ready(function(t){jQuery.fn.extend({disable:function(t){return this.each(function(){this.disabled=t})}});jQuery('#screen-meta-links').prependTo('#monsterinsights-header-temp');jQuery('#screen-meta').prependTo('#monsterinsights-header-temp');jQuery('.monsterinsights-help-tip').tooltip({content:function(){return jQuery(this).prop('title')},tooltipClass:'monsterinsights-ui-tooltip',position:{my:'center top',at:'center bottom+10',collision:'flipfit',},hide:{duration:200,},show:{duration:200,},});jQuery('body').tooltip({selector:'.monsterinsights-reports-uright-tooltip',items:'[data-tooltip-title], [data-tooltip-description]',content:function(){return'<div class="monsterinsights-reports-tooltip-title">'+jQuery(this).data('tooltip-title')+'</div><div class="monsterinsights-reports-tooltip-content">'+jQuery(this).data('tooltip-description')+'</div>'},tooltipClass:'monsterinsights-reports-ui-tooltip',position:{my:'right-10 top',at:'left top',collision:'flipfit'},hide:{duration:200},show:{duration:200},});if(typeof Clipboard!=='undefined'){var i=new Clipboard('.monsterinsights-copy-to-clipboard');jQuery(document).on('click','.monsterinsights-copy-to-clipboard',function(t){t.preventDefault()});function m(t){var e='',n=(t==='cut'?'X':'C');if(/iPhone|iPad/i.test(navigator.userAgent)){e='No support :('}
2
  else if(/Mac/i.test(navigator.userAgent)){e='Press ⌘-'+n+' to '+t}
3
  else{e='Press Ctrl-'+n+' to '+t};return e};i.on('success',function(t){t.trigger.textContent=monsterinsights_admin.copied;window.setTimeout(function(){t.trigger.textContent=monsterinsights_admin.copytoclip},2000)});i.on('error',function(t){t.trigger.textContent=m(t.action)})};function r(e,n){n.parentText=n.parentText||'';if(jQuery.trim(e.term)===''){return n};if(n.children&&n.children.length>0){var i=t.extend(!0,{},n);for(var s=n.children.length-1;s>=0;s--){var o=n.children[s];o.parentText+=n.parentText+' '+n.text;var d=r(e,o);if(d==null){i.children.splice(s,1)}};if(i.children.length>0){return i};return r(e,i)};var a=(n.parentText+' '+n.text).toUpperCase(),l=e.term.toUpperCase();if(a.indexOf(l)>-1){return n};return null};jQuery('.monsterinsights-select300').select300();var e=!1;jQuery(document).on('change','#monsterinsights-settings :input',function(){e=!0});jQuery(document).on('click','a:not(.monsterinsights-settings-click-excluded)',function(t){if(e){var n=confirm(monsterinsights_admin.settings_changed_confirm);if(n){e=!1;return!0}
4
  else{t.preventDefault();return!1}}});jQuery('#monsterinsights-google-authenticate-submit').on('click',function(t){t.preventDefault();swal({type:'info',title:monsterinsights_admin.redirect_loading_title_text,text:monsterinsights_admin.redirect_loading_text_text,allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,onOpen:function(){swal.showLoading()}}).catch(swal.noop);var e={'action':'monsterinsights_maybe_authenticate','nonce':monsterinsights_admin.admin_nonce,'isnetwork':monsterinsights_admin.isnetwork};jQuery.post(ajaxurl,e,function(t){if(t.success){window.location=t.data.redirect}
7
  else{swal({type:'error',title:monsterinsights_admin.verify_loading_error_title,text:t.data.message,confirmButtonText:monsterinsights_admin.ok_text,}).catch(swal.noop)}}).fail(function(t,e,n){var s=jQuery(t.responseText).text();s=s.substring(0,s.indexOf('Call Stack'));swal({type:'error',title:monsterinsights_admin.verify_loading_error_title,text:s,confirmButtonText:monsterinsights_admin.ok_text,}).catch(swal.noop)})});jQuery(document).on('click','#monsterinsights-google-deauthenticate-submit',function(e){e.preventDefault();o(t(this),!1)});jQuery(document).on('click','#monsterinsights-google-force-deauthenticate-submit',function(e){e.preventDefault();o(t(this),!0)});function o(t,e){swal({type:'info',title:monsterinsights_admin.deauth_loading_title_text,text:monsterinsights_admin.deauth_loading_text_text,allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,onOpen:function(){swal.showLoading()}}).catch(swal.noop);var n={'action':'monsterinsights_maybe_delete','nonce':monsterinsights_admin.admin_nonce,'isnetwork':monsterinsights_admin.isnetwork,'forcedelete':e.toString(),};jQuery.post(ajaxurl,n,function(n){if(n.success){swal({type:'success',title:monsterinsights_admin.deauth_success_title_text,text:monsterinsights_admin.deauth_success_text_text,confirmButtonText:monsterinsights_admin.ok_text,allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,}).then(function(){location.reload()}).catch(swal.noop)}
8
  else{if(!e){t.attr('name','monsterinsights-google-force-deauthenticate-submit');t.attr('id','monsterinsights-google-force-deauthenticate-submit');t.attr('value',monsterinsights_admin.force_deauth_button_text)};swal({type:'error',title:monsterinsights_admin.deauth_loading_error_title,text:n.data.message,confirmButtonText:monsterinsights_admin.ok_text,}).catch(swal.noop)}}).fail(function(t,e,n){var s=jQuery(t.responseText).text();s=s.substring(0,s.indexOf('Call Stack'));swal({type:'error',title:monsterinsights_admin.deauth_loading_error_title,text:s,confirmButtonText:monsterinsights_admin.ok_text,}).catch(swal.noop)})};jQuery('#monsterinsights-url-builder input').keyup(a);jQuery('#monsterinsights-url-builder input').click(a);function a(){var n=jQuery('#monsterinsights-url-builer-domain').val().trim(),i=jQuery('#monsterinsights-url-builer-source').val().trim(),r=jQuery('#monsterinsights-url-builer-medium').val().trim(),o=jQuery('#monsterinsights-url-builer-term').val().trim(),a=jQuery('#monsterinsights-url-builer-content').val().trim(),l=jQuery('#monsterinsights-url-builer-name').val().trim(),e=jQuery('#monsterinsights-url-builer-fragment').is(':checked'),s=n.substring(n.lastIndexOf('/')+1);if(e&&s.length>0&&s.indexOf('#')>-1){e='&'}
9
  else if(!e&&s.length>0&&s.indexOf('?')>-1){e='&'}
10
+ else{e=e?'#':'?'};var t=n+e+'utm_source='+encodeURIComponent(i);if(r){t=t+'&utm_medium='+encodeURIComponent(r)};if(l){t=t+'&utm_campaign='+encodeURIComponent(l)};if(o){t=t+'&utm_term='+encodeURIComponent(o)};if(a){t=t+'&utm_content='+encodeURIComponent(a)};if(n&&i){jQuery('#monsterinsights-url-builer-url').html(t.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'))}
11
  else{jQuery('#monsterinsights-url-builer-url').html('')}};jQuery(document).on('click','#monsterinsights-shorten-url',function(t){t.preventDefault();jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.working);var e=decodeURIComponent(jQuery('#monsterinsights-url-builer-url').val()),n={'action':'monsterinsights_get_shortlink','url':e,'nonce':monsterinsights_admin.admin_nonce,};jQuery.post(ajaxurl,n,function(t){jQuery('#monsterinsights-url-builer-url').html(t.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'));jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.shortened);window.setTimeout(function(){jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.shorten)},2000)}).fail(function(t,e,n){jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.failed);window.setTimeout(function(){jQuery('#monsterinsights-shorten-url').text(monsterinsights_admin.shorten)},2000)})});if(jQuery('#monsterinsights-addons').length!==0){jQuery('#wpbody').css('background-color','#f1f1f1');jQuery('body').css('background-color','#f1f1f1');jQuery('#wpfooter').css('background-color','#f1f1f1');jQuery('#wpbody-content').css('padding-bottom','0px')};var d;jQuery('form#add-on-search input#add-on-searchbox').on('keyup',function(){clearTimeout(d);var t=jQuery(this),e=jQuery(t).val().toLowerCase(),n=jQuery(t).data('heading'),s=jQuery(t).data('results'),i=jQuery(t).data('cancel');jQuery('form#add-on-search .spinner').css('visibility','visible');if(e.length<3){jQuery('div.monsterinsights-addon').fadeIn('fast',function(){jQuery('form#add-on-search .spinner').css('visibility','hidden')});return};jQuery('div.monsterinsights-addon').each(function(){if(jQuery('h3.monsterinsights-addon-title',jQuery(this)).text().toLowerCase().search(e)>=0){jQuery(this).fadeIn()}
12
  else{jQuery(this).fadeOut()}});jQuery('form#add-on-search .spinner').css('visibility','hidden')});var s=new List('monsterinsights-addons-licensed',{valueNames:['monsterinsights-addon-title']});var n=new List('monsterinsights-addons-unlicensed',{valueNames:['monsterinsights-addon-title']});jQuery('select#monsterinsights-filter-select').on('change',function(){if(typeof s.sort!=='undefined'){s.sort('monsterinsights-addon-title',{order:jQuery(this).val(),})};if(typeof n.sort!=='undefined'){n.sort('monsterinsights-addon-title',{order:jQuery(this).val(),})}});jQuery('#monsterinsights-addons').on('click.refreshInstallAddon','.monsterinsights-addon-action-button',function(e){var n=jQuery(this),s=jQuery('#monsterinsights-addons').find('.monsterinsights-addon-action-button');t.each(s,function(t,e){if(n==e){return!0};u(e)})});jQuery('#monsterinsights-addons').on('click.activateAddon','.monsterinsights-activate-addon',function(e){e.preventDefault();var n=jQuery(this);jQuery('.monsterinsights-addon-error').remove();jQuery(this).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.activating);jQuery(this).next().css({'display':'inline-block','margin-top':'0px'});var s=jQuery(this),o=jQuery(this).attr('rel'),i=jQuery(this).parent().parent(),r=jQuery(this).parent().parent().find('.addon-status'),a={url:ajaxurl,type:'post',async:!0,cache:!1,dataType:'json',data:{action:'monsterinsights_activate_addon',nonce:monsterinsights_admin.activate_nonce,plugin:o,isnetwork:monsterinsights_admin.isnetwork},success:function(t){if(t&&!0!==t){jQuery(i).slideDown('normal',function(){jQuery(this).after('<div class="monsterinsights-addon-error"><strong>'+t.error+'</strong></div>');n.next().hide();jQuery('.monsterinsights-addon-error').delay(3000).slideUp()});return};if(monsterinsights_admin.isnetwork){jQuery(s).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.networkdeactivate).removeClass('monsterinsights-activate-addon').addClass('monsterinsights-deactivate-addon')}
13
  else{jQuery(s).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.deactivate).removeClass('monsterinsights-activate-addon').addClass('monsterinsights-deactivate-addon')};jQuery(r).text(monsterinsights_admin.active);var o=jQuery(r),e,a,l;e=o.html().split(/\s+/);a=e.pop();l=e.join(' ');o.html([l,' <span>',a,'</span>'].join(''));jQuery(i).removeClass('monsterinsights-addon-inactive').addClass('monsterinsights-addon-active');n.next().hide()},error:function(t,e,s){n.next().hide();return}};t.ajax(a)});jQuery('#monsterinsights-addons').on('click.deactivateAddon','.monsterinsights-deactivate-addon',function(e){e.preventDefault();var n=jQuery(this);jQuery('.monsterinsights-addon-error').remove();jQuery(this).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.deactivating);jQuery(this).next().css({'display':'inline-block','margin-top':'0px'});var s=jQuery(this),o=jQuery(this).attr('rel'),i=jQuery(this).parent().parent(),r=jQuery(this).parent().parent().find('.addon-status'),a={url:ajaxurl,type:'post',async:!0,cache:!1,dataType:'json',data:{action:'monsterinsights_deactivate_addon',nonce:monsterinsights_admin.deactivate_nonce,plugin:o,isnetwork:monsterinsights_admin.isnetwork},success:function(t){if(t&&!0!==t){jQuery(i).slideDown('normal',function(){jQuery(this).after('<div class="monsterinsights-addon-error"><strong>'+t.error+'</strong></div>');n.next().hide();jQuery('.monsterinsights-addon-error').delay(3000).slideUp()});return};if(monsterinsights_admin.isnetwork){jQuery(s).html('<i class="monsterinsights-toggle-on"></i> '+monsterinsights_admin.networkactivate).removeClass('monsterinsights-deactivate-addon').addClass('monsterinsights-activate-addon')}
googleanalytics.php CHANGED
@@ -6,7 +6,7 @@
6
  * Author: MonsterInsights
7
  * Author URI: https://www.monsterinsights.com/
8
  *
9
- * Version: 7.0.0
10
  * Requires at least: 3.8.0
11
  * Tested up to: 4.9
12
  *
@@ -69,7 +69,7 @@ final class MonsterInsights_Lite {
69
  * @access public
70
  * @var string $version Plugin version.
71
  */
72
- public $version = '7.0.0';
73
 
74
  /**
75
  * Plugin file.
6
  * Author: MonsterInsights
7
  * Author URI: https://www.monsterinsights.com/
8
  *
9
+ * Version: 7.0.1
10
  * Requires at least: 3.8.0
11
  * Tested up to: 4.9
12
  *
69
  * @access public
70
  * @var string $version Plugin version.
71
  */
72
+ public $version = '7.0.1';
73
 
74
  /**
75
  * Plugin file.
includes/admin/admin.php CHANGED
@@ -345,6 +345,19 @@ function monsterinsights_admin_setup_notices() {
345
  }
346
  }
347
  // 5. Automatic updates not configured
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  if ( ! is_network_admin() ) {
349
  $updates = monsterinsights_get_option( 'automatic_updates', false );
350
  $url = admin_url( 'admin.php?page=monsterinsights_settings' );
@@ -359,6 +372,7 @@ function monsterinsights_admin_setup_notices() {
359
  }
360
  }
361
 
 
362
  if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) {
363
  if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) {
364
  echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">';
@@ -388,6 +402,8 @@ function monsterinsights_admin_setup_notices() {
388
  return;
389
  }
390
  }
 
 
391
  if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) {
392
  if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) {
393
  echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">';
345
  }
346
  }
347
  // 5. Automatic updates not configured
348
+ $authed = MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed();
349
+ $url = is_network_admin() ? network_admin_url( 'admin.php?page=monsterinsights_network' ) : admin_url( 'admin.php?page=monsterinsights_settings' );
350
+
351
+ if ( empty( $authed ) && ! isset( $notices['monsterinsights_auth_not_manual' ] ) ) {
352
+ echo '<div class="notice notice-info is-dismissible monsterinsights-notice" data-notice="monsterinsights_auth_not_manual">';
353
+ echo '<p>';
354
+ echo sprintf( esc_html__( 'Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with MonsterInsights%2$s so that you can access our new reporting area and take advantage of new MonsterInsights features.', 'google-analytics-for-wordpress' ), '<a href="' . $url .'">', '</a>' );
355
+ echo '</p>';
356
+ echo '</div>';
357
+ return;
358
+ }
359
+
360
+ // 6. Authenticate, not manual
361
  if ( ! is_network_admin() ) {
362
  $updates = monsterinsights_get_option( 'automatic_updates', false );
363
  $url = admin_url( 'admin.php?page=monsterinsights_settings' );
372
  }
373
  }
374
 
375
+ // 7. WooUpsell
376
  if ( ! monsterinsights_is_pro_version() && class_exists( 'WooCommerce' ) ) {
377
  if ( ! isset( $notices['monsterinsights_woocommerce_tracking_available' ] ) ) {
378
  echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_woocommerce_tracking_available">';
402
  return;
403
  }
404
  }
405
+
406
+ // 8. EDDUpsell
407
  if ( ! monsterinsights_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) {
408
  if ( ! isset( $notices['monsterinsights_edd_tracking_available' ] ) ) {
409
  echo '<div class="notice notice-success is-dismissible monsterinsights-notice monsterinsights-wooedd-upsell-row" data-notice="monsterinsights_edd_tracking_available">';
includes/admin/api-auth.php CHANGED
@@ -425,6 +425,15 @@ final class MonsterInsights_API_Auth {
425
  }
426
 
427
  public function get_sitei() {
428
- return mb_strimwidth( rtrim( ltrim( sanitize_text_field( preg_replace('/[^a-zA-Z0-9]/', '', AUTH_KEY . SECURE_AUTH_KEY . LOGGED_IN_KEY ) ) ) ), 0, 30 );
 
 
 
 
 
 
 
 
 
429
  }
430
  }
425
  }
426
 
427
  public function get_sitei() {
428
+ $auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';
429
+ $secure_auth_key = defined( 'SECURE_AUTH_KEY' ) ? SECURE_AUTH_KEY : '';
430
+ $logged_in_key = defined( 'LOGGED_IN_KEY' ) ? LOGGED_IN_KEY : '';
431
+
432
+ $sitei = $auth_key . $secure_auth_key . $logged_in_key;
433
+ $sitei = preg_replace('/[^a-zA-Z0-9]/', '', $sitei );
434
+ $sitei = sanitize_text_field( $sitei );
435
+ $sitei = trim( $sitei );
436
+ $sitei = ( strlen($sitei) > 30 ) ? substr($sitei, 0, 30 ) : $sitei;
437
+ return $sitei;
438
  }
439
  }
includes/admin/common.php CHANGED
@@ -217,6 +217,7 @@ function monsterinsights_remove_conflicting_asset_files() {
217
  'imagify-sweetalert', // Imagify
218
  'smls-backend-style', // Smart Logo Showcase Lite
219
  'wp-reactjs-starter', // wp-real-media-library
 
220
  );
221
 
222
  $scripts = array(
@@ -231,6 +232,22 @@ function monsterinsights_remove_conflicting_asset_files() {
231
  'imagify-chart', // Imagify
232
  'chartjs', // Comet Cache Pro
233
  'wp-reactjs-starter', // wp-real-media-library
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  );
235
 
236
  if ( ! empty( $styles ) ) {
217
  'imagify-sweetalert', // Imagify
218
  'smls-backend-style', // Smart Logo Showcase Lite
219
  'wp-reactjs-starter', // wp-real-media-library
220
+ 'control-panel-modal-plugin', // Ken Theme
221
  );
222
 
223
  $scripts = array(
232
  'imagify-chart', // Imagify
233
  'chartjs', // Comet Cache Pro
234
  'wp-reactjs-starter', // wp-real-media-library
235
+ 'jquery-tooltipster', // WP Real Media Library
236
+ 'jquery-nested-sortable', // WP Real Media Library
237
+ 'jquery-aio-tree', // WP Real Media Library
238
+ 'wp-media-picker', // WP Real Media Library
239
+ 'rml-general', // WP Real Media Library
240
+ 'rml-library', // WP Real Media Library
241
+ 'rml-grid', // WP Real Media Library
242
+ 'rml-list', // WP Real Media Library
243
+ 'rml-modal', // WP Real Media Library
244
+ 'rml-order', // WP Real Media Library
245
+ 'rml-meta', // WP Real Media Library
246
+ 'rml-uploader', // WP Real Media Library
247
+ 'rml-options', // WP Real Media Library
248
+ 'rml-usersettings', // WP Real Media Library
249
+ 'rml-main', // WP Real Media Library
250
+ 'control-panel-sweet-alert', // Ken Theme
251
  );
252
 
253
  if ( ! empty( $styles ) ) {
includes/admin/pages/network-settings.php CHANGED
@@ -149,6 +149,22 @@ function monsterinsights_network_page() {
149
  </form>
150
  </tr>
151
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  </tbody>
153
  </table>
154
  </div>
149
  </form>
150
  </tr>
151
  <?php } ?>
152
+ <!-- Upgrade Doc -->
153
+ <?php if ( ! monsterinsights_is_pro_version() ) { ?>
154
+ <tr id="monsterinsights-upgrade-link">
155
+ <th scope="row">
156
+ <label for="monsterinsights-upgrade-link"><?php esc_html_e( 'Unlock MonsterInsights Pro', 'google-analytics-for-wordpress' ); ?></label>
157
+ </th>
158
+ <td>
159
+ <p>
160
+ <?php echo sprintf( esc_html__( 'Already purchased an upgrade to MonsterInsights Pro? To unlock your Pro features and addons, %sfollow our upgrade guide%s to install MonsterInsights Pro.' ), '<a href="https://www.monsterinsights.com/docs/go-lite-pro/?utm_source=wpdashboard&utm_campaign=upgradedocinstall">', '</a>' ); ?>
161
+ </p>
162
+ <p>
163
+ <?php echo sprintf( esc_html__( "Don't yet have a Pro license? %sVisit our website%s to upgrade and learn more about all the amazing features, expanded report and powerful addons you unlock when you go Pro." ), '<a href="https://www.monsterinsights.com/lite/?utm_source=wpdashboard&utm_campaign=upgradedocbuy">', '</a>' ); ?>
164
+ </p>
165
+ </td>
166
+ </tr>
167
+ <?php } ?>
168
  </tbody>
169
  </table>
170
  </div>
includes/admin/reports/abstract-report.php CHANGED
@@ -204,7 +204,7 @@ class MonsterInsights_Report {
204
 
205
  if ( ! empty( $data ) &&
206
  ! empty( $data['expires'] ) &&
207
- $data['expires'] >= date() &&
208
  ! empty( $data['data'] ) &&
209
  ! empty( $data['p'] ) &&
210
  $data['p'] === $p
204
 
205
  if ( ! empty( $data ) &&
206
  ! empty( $data['expires'] ) &&
207
+ $data['expires'] >= time() &&
208
  ! empty( $data['data'] ) &&
209
  ! empty( $data['p'] ) &&
210
  $data['p'] === $p
includes/admin/settings/register-settings.php CHANGED
@@ -348,8 +348,8 @@ function monsterinsights_get_registered_settings() {
348
  array(
349
  'view_reports' => array(
350
  'id' => 'view_reports',
351
- 'name' => __( 'Let these user roles see reports (and the dashboard):', 'google-analytics-for-wordpress' ),
352
- 'desc' => sprintf( esc_html( 'Users that have at least one of these roles will be able to view the reports and dashboard, along with any user with the %s capability.', 'google-analytics-for-wordpress' ), '<code>manage_options</code>'),
353
  'type' => 'select',
354
  'options' => monsterinsights_get_roles(),
355
  'select2' => true,
348
  array(
349
  'view_reports' => array(
350
  'id' => 'view_reports',
351
+ 'name' => __( 'Let these user roles see reports:', 'google-analytics-for-wordpress' ),
352
+ 'desc' => sprintf( esc_html( 'Users that have at least one of these roles will be able to view the reports, along with any user with the %s capability.', 'google-analytics-for-wordpress' ), '<code>manage_options</code>'),
353
  'type' => 'select',
354
  'options' => monsterinsights_get_roles(),
355
  'select2' => true,
includes/admin/settings/tab-general.php CHANGED
@@ -169,6 +169,23 @@ function monsterinsights_settings_general_tab() {
169
  </tr>
170
  <?php } ?>
171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  <!-- Disable Dashboard -->
173
  <?php
174
  $title = esc_html__( 'Disable Reports', 'google-analytics-for-wordpress' );
@@ -180,7 +197,7 @@ function monsterinsights_settings_general_tab() {
180
  <?php $automatic_updates = $automatic_updates ? $automatic_updates : 'none'; ?>
181
  <tr id="monsterinsights-automatic-updates-mode">
182
  <th scope="row">
183
- <label for="monsterinsights-tracking-mode"><?php esc_html_e( 'Automatic Updates', 'google-analytics-for-wordpress' ); ?></label>
184
  </th>
185
  <td>
186
  <label><input type="radio" name="automatic_updates" value="all" <?php checked( $automatic_updates, 'all' ); ?> ><?php esc_html_e('Yes (Recommended) - Get the latest features, bugfixes, and security updates as they are released.', 'google-analytics-for-wordpress'); ?> </label>
169
  </tr>
170
  <?php } ?>
171
 
172
+ <!-- Upgrade Doc -->
173
+ <?php if ( ! monsterinsights_is_pro_version() ) { ?>
174
+ <tr id="monsterinsights-upgrade-link">
175
+ <th scope="row">
176
+ <label for="monsterinsights-upgrade-link"><?php esc_html_e( 'Unlock MonsterInsights Pro', 'google-analytics-for-wordpress' ); ?></label>
177
+ </th>
178
+ <td>
179
+ <p>
180
+ <?php echo sprintf( esc_html__( 'Already purchased an upgrade to MonsterInsights Pro? To unlock your Pro features and addons, %sfollow our upgrade guide%s to install MonsterInsights Pro.' ), '<a href="https://www.monsterinsights.com/docs/go-lite-pro/?utm_source=wpdashboard&utm_campaign=upgradedocinstall">', '</a>' ); ?>
181
+ </p>
182
+ <p>
183
+ <?php echo sprintf( esc_html__( "Don't yet have a Pro license? %sVisit our website%s to upgrade and learn more about all the amazing features, expanded report and powerful addons you unlock when you go Pro." ), '<a href="https://www.monsterinsights.com/lite/?utm_source=wpdashboard&utm_campaign=upgradedocbuy">', '</a>' ); ?>
184
+ </p>
185
+ </td>
186
+ </tr>
187
+ <?php } ?>
188
+
189
  <!-- Disable Dashboard -->
190
  <?php
191
  $title = esc_html__( 'Disable Reports', 'google-analytics-for-wordpress' );
197
  <?php $automatic_updates = $automatic_updates ? $automatic_updates : 'none'; ?>
198
  <tr id="monsterinsights-automatic-updates-mode">
199
  <th scope="row">
200
+ <label for="monsterinsights-automatic-updates-mode"><?php esc_html_e( 'Automatic Updates', 'google-analytics-for-wordpress' ); ?></label>
201
  </th>
202
  <td>
203
  <label><input type="radio" name="automatic_updates" value="all" <?php checked( $automatic_updates, 'all' ); ?> ><?php esc_html_e('Yes (Recommended) - Get the latest features, bugfixes, and security updates as they are released.', 'google-analytics-for-wordpress'); ?> </label>
includes/frontend/frontend.php CHANGED
@@ -21,53 +21,26 @@ if ( ! defined( 'ABSPATH' ) ) {
21
  * for the frontend_output() function to output. These are
22
  * generally dimensions and turned on GA features.
23
  *
24
- * @since 6.0.0
25
  * @access public
26
  *
27
  * @return array Array of the options to use.
28
  */
29
  function monsterinsights_tracking_script( ) {
30
-
31
- $tracking_mode = monsterinsights_get_option( 'tracking_mode', 'analytics' );
32
-
33
  require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/class-tracking-abstract.php';
34
- $mode = '';
35
 
36
- if ( is_preview() ) {
37
- $mode = 'preview';
38
- } else if ( ! monsterinsights_track_user() ) {
39
- $mode = 'disabled';
40
- } else if ( $tracking_mode === 'analytics' || $tracking_mode === 'ga' ) {
41
- $mode = 'analytics';
42
- } else {
43
- //$mode = apply_filters( 'monsterinsights_custom_tracking_name', 'name-of-method' );
44
- }
45
 
46
  do_action( 'monsterinsights_tracking_before_' . $mode );
47
  do_action( 'monsterinsights_tracking_before', $mode );
48
-
49
- switch ( $mode ) {
50
- case 'preview':
51
- require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-preview.php';
52
- $tracking = new MonsterInsights_Tracking_Preview();
53
- echo $tracking->frontend_output();
54
- break;
55
-
56
- case 'disabled':
57
- require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-disabled.php';
58
- $tracking = new MonsterInsights_Tracking_Disabled();
59
- echo $tracking->frontend_output();
60
- break;
61
-
62
- case 'analytics':
63
- require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-analytics.php';
64
- $tracking = new MonsterInsights_Tracking_Analytics();
65
- echo $tracking->frontend_output();
66
- break;
67
-
68
- default:
69
- //do_action( 'monsterinsights_custom_tracking' );
70
- break;
71
  }
72
 
73
  do_action( 'monsterinsights_tracking_after_' . $mode );
21
  * for the frontend_output() function to output. These are
22
  * generally dimensions and turned on GA features.
23
  *
24
+ * @since 7.0.0
25
  * @access public
26
  *
27
  * @return array Array of the options to use.
28
  */
29
  function monsterinsights_tracking_script( ) {
 
 
 
30
  require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/class-tracking-abstract.php';
 
31
 
32
+ $mode = is_preview() ? 'preview' : 'analytics';
 
 
 
 
 
 
 
 
33
 
34
  do_action( 'monsterinsights_tracking_before_' . $mode );
35
  do_action( 'monsterinsights_tracking_before', $mode );
36
+ if ( $mode === 'preview' ) {
37
+ require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-preview.php';
38
+ $tracking = new MonsterInsights_Tracking_Preview();
39
+ echo $tracking->frontend_output();
40
+ } else {
41
+ require_once plugin_dir_path( MONSTERINSIGHTS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-analytics.php';
42
+ $tracking = new MonsterInsights_Tracking_Analytics();
43
+ echo $tracking->frontend_output();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  do_action( 'monsterinsights_tracking_after_' . $mode );
includes/frontend/tracking/class-tracking-analytics.php CHANGED
@@ -66,6 +66,15 @@ class MonsterInsights_Tracking_Analytics extends MonsterInsights_Tracking_Abstra
66
  return $options;
67
  }
68
 
 
 
 
 
 
 
 
 
 
69
  $domain = esc_attr( monsterinsights_get_option( 'subdomain_tracking', 'auto' ) );
70
 
71
  $allow_linker = monsterinsights_get_option( 'add_allow_linker', false );
@@ -81,6 +90,10 @@ class MonsterInsights_Tracking_Analytics extends MonsterInsights_Tracking_Abstra
81
  $create['allowLinker'] = true;
82
  }
83
 
 
 
 
 
84
  $create = apply_filters( 'monsterinsights_frontend_tracking_options_analytics_create', $create );
85
 
86
  if ( $create && ! empty( $create ) && is_array( $create ) ) {
@@ -167,14 +180,32 @@ class MonsterInsights_Tracking_Analytics extends MonsterInsights_Tracking_Abstra
167
  if ( current_user_can( 'manage_options' ) && $is_debug_mode ) {
168
  $src = apply_filters( 'monsterinsights_frontend_output_analytics_src', '//www.google-analytics.com/analytics_debug.js' );
169
  }
170
- $compat = monsterinsights_get_option( 'gatracker_compatibility_mode', false );
171
- $compat = $compat ? 'window.ga = __gaTracker;' : '';
 
 
172
  ob_start();
173
  ?>
174
  <!-- This site uses the Google Analytics by MonsterInsights plugin v<?php echo MONSTERINSIGHTS_VERSION; ?> - Using Analytics tracking - https://www.monsterinsights.com/ -->
175
- <?php if ( monsterinsights_get_ua() ) { ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  <script type="text/javascript" data-cfasync="false">
177
- <?php if ( $this->should_do_optout() ) { ?>
 
178
  var disableStr = 'ga-disable-<?php echo monsterinsights_get_ua(); ?>';
179
 
180
  /* Function to detect opted out users */
@@ -193,26 +224,74 @@ class MonsterInsights_Tracking_Analytics extends MonsterInsights_Tracking_Abstra
193
  window[disableStr] = true;
194
  }
195
  <?php } ?>
196
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
197
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
198
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
199
- })(window,document,'script','<?php echo $src; ?>','__gaTracker');
 
 
200
 
201
  <?php
202
- if ( current_user_can( 'manage_options' ) && $is_debug_mode ) {
203
- echo 'window.ga_debug = {trace: true};';
204
- }
205
- echo $compat;
206
- if ( count( $options ) >= 1 ) {
207
- foreach ( $options as $item ) {
208
- if ( ! is_array( $item ) ) {
209
- echo ' __gaTracker(' . $item . ");\n";
210
- } else if ( ! empty ( $item['value'] ) ) {
211
- echo ' ' . $item['value'] . "\n";
 
 
 
212
  }
213
  }
214
- }
215
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  </script>
217
  <?php } else { ?>
218
  <!-- No UA code set -->
66
  return $options;
67
  }
68
 
69
+ $track_user = monsterinsights_track_user();
70
+
71
+ if ( ! $track_user ) {
72
+ $options['create'] = "'create', '" . esc_js( $ua_code ) . "', '" . esc_js( 'auto' ) . "'";
73
+ $options['forceSSL'] = "'set', 'forceSSL', true";
74
+ $options['send'] = "'send','pageview'";
75
+ return $options;
76
+ }
77
+
78
  $domain = esc_attr( monsterinsights_get_option( 'subdomain_tracking', 'auto' ) );
79
 
80
  $allow_linker = monsterinsights_get_option( 'add_allow_linker', false );
90
  $create['allowLinker'] = true;
91
  }
92
 
93
+ if ( class_exists( 'MonsterInsights_AMP' ) ) {
94
+ $create['useAmpClientId'] = true;
95
+ }
96
+
97
  $create = apply_filters( 'monsterinsights_frontend_tracking_options_analytics_create', $create );
98
 
99
  if ( $create && ! empty( $create ) && is_array( $create ) ) {
180
  if ( current_user_can( 'manage_options' ) && $is_debug_mode ) {
181
  $src = apply_filters( 'monsterinsights_frontend_output_analytics_src', '//www.google-analytics.com/analytics_debug.js' );
182
  }
183
+ $compat = monsterinsights_get_option( 'gatracker_compatibility_mode', false );
184
+ $compat = $compat ? 'window.ga = __gaTracker;' : '';
185
+ $track_user = monsterinsights_track_user();
186
+ $ua = monsterinsights_get_ua();
187
  ob_start();
188
  ?>
189
  <!-- This site uses the Google Analytics by MonsterInsights plugin v<?php echo MONSTERINSIGHTS_VERSION; ?> - Using Analytics tracking - https://www.monsterinsights.com/ -->
190
+ <?php if ( ! $track_user ) {
191
+ $output = '';
192
+ $reason = '';
193
+ if ( empty( $ua ) ) {
194
+ $reason = __( 'Note: MonsterInsights is not currently configured on this site. The site owner needs to authenticate with Google Analytics in the MonsterInsights settings panel.', 'google-analytics-for-wordpress' );
195
+ $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL;
196
+ } else if ( current_user_can( 'monsterinsights_save_settings' ) ) {
197
+ $reason = __( 'Note: MonsterInsights does not track you as a logged in site administrator to prevent site owners from accidentally skewing their own Google Analytics data.'. PHP_EOL . 'If you are testing Google Analytics code, please do so either logged out or in the private browsing/incognito mode of your web browser.', 'google-analytics-for-wordpress' );
198
+ $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL;
199
+ } else {
200
+ $reason = __( 'Note: The site owner has disabled Google Analytics tracking for your user role.', 'google-analytics-for-wordpress' );
201
+ $output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL;
202
+ }
203
+ echo $output;
204
+ } ?>
205
+ <?php if ( $ua ) { ?>
206
  <script type="text/javascript" data-cfasync="false">
207
+ <?php if ( $this->should_do_optout() ) { ?>
208
+ var mi_track_user = <?php echo ( $track_user ? 'true' : 'false' ); ?>;
209
  var disableStr = 'ga-disable-<?php echo monsterinsights_get_ua(); ?>';
210
 
211
  /* Function to detect opted out users */
224
  window[disableStr] = true;
225
  }
226
  <?php } ?>
227
+
228
+ if ( mi_track_user ) {
229
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
230
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
231
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
232
+ })(window,document,'script','<?php echo $src; ?>','__gaTracker');
233
 
234
  <?php
235
+ if ( current_user_can( 'manage_options' ) && $is_debug_mode ) {
236
+ echo 'window.ga_debug = {trace: true};';
237
+ }
238
+
239
+ echo $compat;
240
+
241
+ if ( count( $options ) >= 1 ) {
242
+ foreach ( $options as $item ) {
243
+ if ( ! is_array( $item ) ) {
244
+ echo ' __gaTracker(' . $item . ");\n";
245
+ } else if ( ! empty ( $item['value'] ) ) {
246
+ echo ' ' . $item['value'] . "\n";
247
+ }
248
  }
249
  }
250
+ ?>
251
+ } else {
252
+ console.log( '%c' + "<?php echo esc_js( $reason );?>", 'color:#F74C2F;font-size: 1.5em;font-weight:800;');
253
+ (function() {
254
+ /* https://developers.google.com/analytics/devguides/collection/analyticsjs/ */
255
+ var noopfn = function() {
256
+ return null;
257
+ };
258
+ var noopnullfn = function() {
259
+ return null;
260
+ };
261
+ var Tracker = function() {
262
+ return null;
263
+ };
264
+ var p = Tracker.prototype;
265
+ p.get = noopfn;
266
+ p.set = noopfn;
267
+ p.send = noopfn;
268
+ var __gaTracker = function() {
269
+ var len = arguments.length;
270
+ if ( len === 0 ) {
271
+ return;
272
+ }
273
+ var f = arguments[len-1];
274
+ if ( typeof f !== 'object' || f === null || typeof f.hitCallback !== 'function' ) {
275
+ console.log( '<?php echo esc_js( __('Not running function', 'google-analytics-for-wordpress' ) );?> __gaTracker(' + arguments[0] + " ....) <?php echo esc_js( sprintf( __( "because you're not being tracked. %s", 'google-analytics-for-wordpress' ), $reason ) );?>");
276
+ return;
277
+ }
278
+ try {
279
+ f.hitCallback();
280
+ } catch (ex) {
281
+
282
+ }
283
+ };
284
+ __gaTracker.create = function() {
285
+ return new Tracker();
286
+ };
287
+ __gaTracker.getByName = noopnullfn;
288
+ __gaTracker.getAll = function() {
289
+ return [];
290
+ };
291
+ __gaTracker.remove = noopfn;
292
+ window['__gaTracker'] = __gaTracker;
293
+ })();
294
+ }
295
  </script>
296
  <?php } else { ?>
297
  <!-- No UA code set -->
includes/frontend/tracking/class-tracking-disabled.php DELETED
@@ -1,89 +0,0 @@
1
- <?php
2
- /**
3
- * Tracking debug class.
4
- *
5
- * @since 6.0.0
6
- *
7
- * @package MonsterInsights
8
- * @author Chris Christoff
9
- */
10
-
11
- // Exit if accessed directly
12
- if ( ! defined( 'ABSPATH' ) ) {
13
- exit;
14
- }
15
-
16
- class MonsterInsights_Tracking_Disabled extends MonsterInsights_Tracking_Abstract {
17
-
18
- /**
19
- * Holds the name of the tracking type.
20
- *
21
- * @since 6.0.0
22
- * @access public
23
- *
24
- * @var string $name Name of the tracking type.
25
- */
26
- public $name = 'disabled';
27
-
28
- /**
29
- * Version of the tracking class.
30
- *
31
- * @since 6.0.0
32
- * @access public
33
- *
34
- * @var string $version Version of the tracking class.
35
- */
36
- public $version = '1.0.0';
37
-
38
- /**
39
- * Primary class constructor.
40
- *
41
- * @since 6.0.0
42
- * @access public
43
- */
44
- public function __construct() {
45
-
46
- }
47
-
48
- /**
49
- * Get frontend tracking options.
50
- *
51
- * This function is used to return an array of parameters
52
- * for the frontend_output() function to output. These are
53
- * generally dimensions and turned on GA features.
54
- *
55
- * @since 6.0.0
56
- * @access public
57
- *
58
- * @return array Array of the options to use.
59
- */
60
- public function frontend_tracking_options( ) {
61
- return array();
62
- }
63
-
64
- /**
65
- * Get frontend output.
66
- *
67
- * This function is used to return the Javascript
68
- * to output in the head of the page for the given
69
- * tracking method.
70
- *
71
- * @since 6.0.0
72
- * @access public
73
- *
74
- * @return string Javascript to output.
75
- */
76
- public function frontend_output( ) {
77
- $output = PHP_EOL . '<!-- This site uses the Google Analytics by MonsterInsights plugin v ' . MONSTERINSIGHTS_VERSION .' - https://www.monsterinsights.com/ -->' . PHP_EOL;
78
- $ua = monsterinsights_get_ua();
79
- if ( empty( $ua ) ) {
80
- $output .= '<!-- ' . esc_html__( 'MonsterInsights is not currently configured on this site. The site owner needs to authenticate with Google Analytics in the MonsterInsights settings panel.', 'google-analytics-for-wordpress' ) . ' -->' . PHP_EOL;
81
- } else if ( current_user_can( 'monsterinsights_save_settings' ) ) {
82
- $output .= '<!-- ' . esc_html__( 'MonsterInsights does not track you as a logged in site administrator to prevent site owners from accidentally skewing their own Google Analytics data. To view the Google Analytics code, view the source code either logged out or in the private browsing/incognito mode of your web browser.', 'google-analytics-for-wordpress' ) . ' -->' . PHP_EOL;
83
- } else {
84
- $output .= '<!-- ' . esc_html__( 'The site owner has disabled Google Analytics tracking for your user role.', 'google-analytics-for-wordpress' ) . ' -->' . PHP_EOL;
85
- }
86
- $output .= '<!-- / Google Analytics by MonsterInsights -->' . PHP_EOL . PHP_EOL;
87
- return $output;
88
- }
89
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/google-analytics-for-wordpress.pot CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: MonsterInsights Lite\n"
6
  "Report-Msgid-Bugs-To: https://github.com/awesomemotive/monsterinsights/"
7
  "issues\n"
8
- "POT-Creation-Date: 2018-02-19 10:18-0500\n"
9
  "PO-Revision-Date: 2016-07-21 17:01-0400\n"
10
  "Last-Translator: Chris Christoff <support@monsterinsights.com>\n"
11
  "Language-Team: Chris Christoff <support@monsterinsights.com>\n"
@@ -232,14 +232,22 @@ msgstr ""
232
  msgid "Do not allow"
233
  msgstr ""
234
 
235
- #: includes/admin/admin.php:355
 
 
 
 
 
 
 
 
236
  #, php-format
237
  msgid ""
238
  "Important: Please %1$sconfigure the Automatic Updates Settings%2$s in "
239
  "MonsterInsights."
240
  msgstr ""
241
 
242
- #: includes/admin/admin.php:382 includes/admin/admin.php:411
243
  #, php-format
244
  msgid "%1$sGet MonsterInsights Pro%2$s"
245
  msgstr ""
@@ -512,7 +520,7 @@ msgstr ""
512
  msgid "Error"
513
  msgstr ""
514
 
515
- #: includes/admin/common.php:456
516
  #, php-format
517
  msgid ""
518
  "MonsterInsights has detected that it's files are being blocked. This is "
@@ -761,6 +769,29 @@ msgid ""
761
  "overriden at the single site level)."
762
  msgstr ""
763
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
764
  #: includes/admin/pages/reports.php:93
765
  #, php-format
766
  msgid "%s Report"
@@ -1464,7 +1495,7 @@ msgid ""
1464
  msgstr ""
1465
 
1466
  #: includes/admin/settings/register-settings.php:351
1467
- msgid "Let these user roles see reports (and the dashboard):"
1468
  msgstr ""
1469
 
1470
  #: includes/admin/settings/register-settings.php:361
@@ -1479,35 +1510,35 @@ msgid ""
1479
  msgstr ""
1480
 
1481
  #: includes/admin/settings/register-settings.php:371
1482
- #: includes/admin/settings/tab-general.php:183
1483
  msgid "Automatic Updates"
1484
  msgstr ""
1485
 
1486
  #: includes/admin/settings/register-settings.php:375
1487
- #: includes/admin/settings/tab-general.php:186
1488
  msgid ""
1489
  "Yes (Recommended) - Get the latest features, bugfixes, and security updates "
1490
  "as they are released."
1491
  msgstr ""
1492
 
1493
  #: includes/admin/settings/register-settings.php:376
1494
- #: includes/admin/settings/tab-general.php:187
1495
  msgid ""
1496
  "Minor Only - Only get bugfixes and security updates, but not major features."
1497
  msgstr ""
1498
 
1499
  #: includes/admin/settings/register-settings.php:377
1500
- #: includes/admin/settings/tab-general.php:188
1501
  msgid "None - Manually update everything."
1502
  msgstr ""
1503
 
1504
  #: includes/admin/settings/register-settings.php:382
1505
- #: includes/admin/settings/tab-general.php:195
1506
  msgid "Allow Usage Tracking"
1507
  msgstr ""
1508
 
1509
  #: includes/admin/settings/register-settings.php:383
1510
- #: includes/admin/settings/tab-general.php:196
1511
  msgid ""
1512
  "By allowing us to track usage data we can better help you, because we know "
1513
  "with which WordPress configurations, themes and plugins we should test."
@@ -1530,7 +1561,7 @@ msgid "The callback function used for the %s setting is missing."
1530
  msgstr ""
1531
 
1532
  #: includes/admin/settings/settings-api.php:969
1533
- #: includes/admin/settings/tab-general.php:216
1534
  msgid "Save Changes"
1535
  msgstr ""
1536
 
@@ -1579,11 +1610,11 @@ msgid ""
1579
  "%s will be used as the Google UA code."
1580
  msgstr ""
1581
 
1582
- #: includes/admin/settings/tab-general.php:174
1583
  msgid "Disable Reports"
1584
  msgstr ""
1585
 
1586
- #: includes/admin/settings/tab-general.php:175
1587
  msgid "Hide the reports page."
1588
  msgstr ""
1589
 
@@ -1641,24 +1672,33 @@ msgstr ""
1641
  msgid "%1$s is %3$sdeprecated%4$s since MonsterInsights version %2$s."
1642
  msgstr ""
1643
 
1644
- #: includes/frontend/tracking/class-tracking-disabled.php:80
1645
  msgid ""
1646
- "MonsterInsights is not currently configured on this site. The site owner "
1647
- "needs to authenticate with Google Analytics in the MonsterInsights settings "
1648
- "panel."
1649
  msgstr ""
1650
 
1651
- #: includes/frontend/tracking/class-tracking-disabled.php:82
1652
  msgid ""
1653
- "MonsterInsights does not track you as a logged in site administrator to "
1654
- "prevent site owners from accidentally skewing their own Google Analytics "
1655
- "data. To view the Google Analytics code, view the source code either logged "
1656
- "out or in the private browsing/incognito mode of your web browser."
1657
  msgstr ""
1658
 
1659
- #: includes/frontend/tracking/class-tracking-disabled.php:84
1660
  msgid ""
1661
- "The site owner has disabled Google Analytics tracking for your user role."
 
 
 
 
 
 
 
 
 
 
1662
  msgstr ""
1663
 
1664
  #: includes/frontend/tracking/class-tracking-preview.php:77
5
  "Project-Id-Version: MonsterInsights Lite\n"
6
  "Report-Msgid-Bugs-To: https://github.com/awesomemotive/monsterinsights/"
7
  "issues\n"
8
+ "POT-Creation-Date: 2018-02-26 11:38-0500\n"
9
  "PO-Revision-Date: 2016-07-21 17:01-0400\n"
10
  "Last-Translator: Chris Christoff <support@monsterinsights.com>\n"
11
  "Language-Team: Chris Christoff <support@monsterinsights.com>\n"
232
  msgid "Do not allow"
233
  msgstr ""
234
 
235
+ #: includes/admin/admin.php:354
236
+ #, php-format
237
+ msgid ""
238
+ "Important: You are currently using manual UA code output. We highly "
239
+ "recommend %1$sauthenticating with MonsterInsights%2$s so that you can access "
240
+ "our new reporting area and take advantage of new MonsterInsights features."
241
+ msgstr ""
242
+
243
+ #: includes/admin/admin.php:368
244
  #, php-format
245
  msgid ""
246
  "Important: Please %1$sconfigure the Automatic Updates Settings%2$s in "
247
  "MonsterInsights."
248
  msgstr ""
249
 
250
+ #: includes/admin/admin.php:395 includes/admin/admin.php:424
251
  #, php-format
252
  msgid "%1$sGet MonsterInsights Pro%2$s"
253
  msgstr ""
520
  msgid "Error"
521
  msgstr ""
522
 
523
+ #: includes/admin/common.php:473
524
  #, php-format
525
  msgid ""
526
  "MonsterInsights has detected that it's files are being blocked. This is "
769
  "overriden at the single site level)."
770
  msgstr ""
771
 
772
+ #: includes/admin/pages/network-settings.php:156
773
+ #: includes/admin/settings/tab-general.php:176
774
+ msgid "Unlock MonsterInsights Pro"
775
+ msgstr ""
776
+
777
+ #: includes/admin/pages/network-settings.php:160
778
+ #: includes/admin/settings/tab-general.php:180
779
+ #, php-format
780
+ msgid ""
781
+ "Already purchased an upgrade to MonsterInsights Pro? To unlock your Pro "
782
+ "features and addons, %sfollow our upgrade guide%s to install MonsterInsights "
783
+ "Pro."
784
+ msgstr ""
785
+
786
+ #: includes/admin/pages/network-settings.php:163
787
+ #: includes/admin/settings/tab-general.php:183
788
+ #, php-format
789
+ msgid ""
790
+ "Don't yet have a Pro license? %sVisit our website%s to upgrade and learn "
791
+ "more about all the amazing features, expanded report and powerful addons you "
792
+ "unlock when you go Pro."
793
+ msgstr ""
794
+
795
  #: includes/admin/pages/reports.php:93
796
  #, php-format
797
  msgid "%s Report"
1495
  msgstr ""
1496
 
1497
  #: includes/admin/settings/register-settings.php:351
1498
+ msgid "Let these user roles see reports:"
1499
  msgstr ""
1500
 
1501
  #: includes/admin/settings/register-settings.php:361
1510
  msgstr ""
1511
 
1512
  #: includes/admin/settings/register-settings.php:371
1513
+ #: includes/admin/settings/tab-general.php:200
1514
  msgid "Automatic Updates"
1515
  msgstr ""
1516
 
1517
  #: includes/admin/settings/register-settings.php:375
1518
+ #: includes/admin/settings/tab-general.php:203
1519
  msgid ""
1520
  "Yes (Recommended) - Get the latest features, bugfixes, and security updates "
1521
  "as they are released."
1522
  msgstr ""
1523
 
1524
  #: includes/admin/settings/register-settings.php:376
1525
+ #: includes/admin/settings/tab-general.php:204
1526
  msgid ""
1527
  "Minor Only - Only get bugfixes and security updates, but not major features."
1528
  msgstr ""
1529
 
1530
  #: includes/admin/settings/register-settings.php:377
1531
+ #: includes/admin/settings/tab-general.php:205
1532
  msgid "None - Manually update everything."
1533
  msgstr ""
1534
 
1535
  #: includes/admin/settings/register-settings.php:382
1536
+ #: includes/admin/settings/tab-general.php:212
1537
  msgid "Allow Usage Tracking"
1538
  msgstr ""
1539
 
1540
  #: includes/admin/settings/register-settings.php:383
1541
+ #: includes/admin/settings/tab-general.php:213
1542
  msgid ""
1543
  "By allowing us to track usage data we can better help you, because we know "
1544
  "with which WordPress configurations, themes and plugins we should test."
1561
  msgstr ""
1562
 
1563
  #: includes/admin/settings/settings-api.php:969
1564
+ #: includes/admin/settings/tab-general.php:233
1565
  msgid "Save Changes"
1566
  msgstr ""
1567
 
1610
  "%s will be used as the Google UA code."
1611
  msgstr ""
1612
 
1613
+ #: includes/admin/settings/tab-general.php:191
1614
  msgid "Disable Reports"
1615
  msgstr ""
1616
 
1617
+ #: includes/admin/settings/tab-general.php:192
1618
  msgid "Hide the reports page."
1619
  msgstr ""
1620
 
1672
  msgid "%1$s is %3$sdeprecated%4$s since MonsterInsights version %2$s."
1673
  msgstr ""
1674
 
1675
+ #: includes/frontend/tracking/class-tracking-analytics.php:185
1676
  msgid ""
1677
+ "Note: MonsterInsights is not currently configured on this site. The site "
1678
+ "owner needs to authenticate with Google Analytics in the MonsterInsights "
1679
+ "settings panel."
1680
  msgstr ""
1681
 
1682
+ #: includes/frontend/tracking/class-tracking-analytics.php:188
1683
  msgid ""
1684
+ "Note: MonsterInsights does not track you as a logged in site administrator "
1685
+ "to prevent site owners from accidentally skewing their own Google Analytics "
1686
+ "data."
 
1687
  msgstr ""
1688
 
1689
+ #: includes/frontend/tracking/class-tracking-analytics.php:191
1690
  msgid ""
1691
+ "Note: The site owner has disabled Google Analytics tracking for your user "
1692
+ "role."
1693
+ msgstr ""
1694
+
1695
+ #: includes/frontend/tracking/class-tracking-analytics.php:266
1696
+ msgid "Not running function"
1697
+ msgstr ""
1698
+
1699
+ #: includes/frontend/tracking/class-tracking-analytics.php:266
1700
+ #, php-format
1701
+ msgid "because you're not being tracked. %s"
1702
  msgstr ""
1703
 
1704
  #: includes/frontend/tracking/class-tracking-preview.php:77
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.8.0
6
  Tested up to: 4.9
7
- Stable tag: 7.0.0
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.
@@ -134,6 +134,16 @@ You can also learn about other <a href="http://www.wpbeginner.com/category/plugi
134
  4. Want more features? <a href="https://www.monsterinsights.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion">Purchase MonsterInsights Pro</a>!
135
 
136
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
137
  = 7.0.0: February 20, 2018 =
138
  * New: Completely revamped reports with a new UI.
139
  * New: Ability to oAuth at the network level, and have that oAuth apply as the default to all subsites (can still override at a subsite level).
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.8.0
6
  Tested up to: 4.9
7
+ Stable tag: 7.0.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.
134
  4. Want more features? <a href="https://www.monsterinsights.com/?utm_source=wprepo&utm_medium=link&utm_campaign=liteversion">Purchase MonsterInsights Pro</a>!
135
 
136
  == Changelog ==
137
+ = 7.0.1: February 26, 2018 =
138
+ - New: Support for the updated version of MonsterInsights AMP plugin which switches from using a custom REST endpoint to using the now built in Google AMP ClientID synching feature. If you're using the AMP addon, you'll want to also update that addon as well.
139
+ - New: The __gaTracker and disable tracking functions will always be defined, even when we're not tracking users (for example if viewing a preview, or if a logged-in administrator) to allow sites to not have to worry about breakage when variable exist checking isn't done.
140
+ - New: We now output a notice in the console and output the GA code (though do not run it) when we're not tracking someone. This makes it easier to verify the Google code is indeed outputting, and also makes it more clear as to why a particular user isn't being tracked. Note, when testing Google Analytics code, always do it logged out, ideally in the private browsing/incognito mode of your web browser. We're going to keep working on improving the frontend system to simplify it and add new features for both Lite and Pro users now that we've jettisoned ga.js support in MonsterInsights 7.0. You'll see updates through the year that add new tracking features, particularly ones that we're tweaking in order to expand and refine our built-in reporting.
141
+ - New: We added a "have a MonsterInsights license" link on the settings panel, to make it clearer the procedure for the quick and easy upgrade from MonsterInsights Lite to MonsterInsights Pro.
142
+ - Tweak: We removed the phrase referencing the dashboard (removed in MonsterInsights 7.0) from the permissions settings.
143
+ - Bugfix: Due to us forgetting to include our jQuery shim for disable() in the Lite, some users were unable to use the 10/25/50 expand feature on the reports page.
144
+ - Bugfix: An accidental use of the PHP function date instead of the one called time meant that some users were unable to see updated reporting data each day in the Lite version.
145
+ - Bugfix: In sitei() in the api-auth class, we used mb_strimwidth to trim the final string to 30 characters. While this is a great PHP function, not all servers have the mbstring (Multibyte String) PHP extension installed, from which all mb_* functions are provided, despite it being a "required" PHP extension to use WordPress core. This caused some servers to be unable to authenticate and thus get our amazing new reports (sad face). This usage has been replaced with a standard substr use, thus allowing for compatibility with all servers.
146
+
147
  = 7.0.0: February 20, 2018 =
148
  * New: Completely revamped reports with a new UI.
149
  * New: Ability to oAuth at the network level, and have that oAuth apply as the default to all subsites (can still override at a subsite level).