File "admin-setup-wizard.min.js"

Full Path: /home/stylijtl/public_html/wp-content/plugins/google-analytics-for-wordpress/assets/js/admin-setup-wizard.min.js
File size: 1.16 KB
MIME-type: text/plain
Charset: utf-8

(function(){'use strict';function e(){if(window.monsterinsights&&window.monsterinsights.loading_toast){window.monsterinsights.loading_toast('Preparing setup wizard...')};let formData=new FormData();formData.append('action','monsterinsights_generate_setup_wizard_url');formData.append('nonce',window.monsterinsights.nonce);fetch(window.monsterinsights.ajax,{method:'POST',body:formData,}).then(response=>response.json()).then(response=>{const{data};=response;if(response.success&&data.wizard_url){window.location.href=data.wizard_url}
else{console.error('Setup wizard error:',response);if(window.monsterinsights&&window.monsterinsights.close_swal){window.monsterinsights.close_swal()}}}).catch((error)=>{console.error('Error launching wizard:',error);if(window.monsterinsights&&window.monsterinsights.close_swal){window.monsterinsights.close_swal()}})};function n(){const setupWizardLinks=document.querySelectorAll('.monsterinsights-setup-wizard-link');if(setupWizardLinks.length>0){setupWizardLinks.forEach(link=>{link.addEventListener('click',function(n){n.preventDefault();e()})})}};if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',n)}
else{n()}})();