1 line
5.4 KiB
JavaScript
1 line
5.4 KiB
JavaScript
"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[348,8895],{88895:(e,a,t)=>{t.r(a),t.d(a,{default:()=>l});var n=t(81621),o=t(9588);const r={optin:{labels:["Functional","Statistics","Marketing","Do Not Track","No Choice","No Warning"],categories:["functional","statistics","marketing","do_not_track","no_choice","no_warning"],datasets:[{data:["0","0","0","0","0","0"],backgroundColor:"rgba(46, 138, 55, 1)",borderColor:"rgba(46, 138, 55, 1)",label:"A (default)",fill:"false",borderDash:[0,0]},{data:["0","0","0","0","0","0"],backgroundColor:"rgba(244, 191, 62, 1)",borderColor:"rgba(244, 191, 62, 1)",label:"B",fill:"false",borderDash:[0,0]}],max:5},optout:{labels:["Functional","Statistics","Marketing","Do Not Track","No Choice","No Warning"],categories:["functional","statistics","marketing","do_not_track","no_choice","no_warning"],datasets:[{data:["0","0","0","0","0","0"],backgroundColor:"rgba(46, 138, 55, 1)",borderColor:"rgba(46, 138, 55, 1)",label:"A (default)",fill:"false",borderDash:[0,0]},{data:["0","0","0","0","0","0"],backgroundColor:"rgba(244, 191, 62, 1)",borderColor:"rgba(244, 191, 62, 1)",label:"B",fill:"false",borderDash:[0,0]}],max:5}},s={optin:{labels:["Functional","Statistics","Marketing","Do Not Track","No Choice","No Warning"],categories:["functional","statistics","marketing","do_not_track","no_choice","no_warning"],datasets:[{data:["29","747","174","292","30","10"],backgroundColor:"rgba(46, 138, 55, 1)",borderColor:"rgba(46, 138, 55, 1)",label:"Demo A (default)",fill:"false",borderDash:[0,0]},{data:["3","536","240","389","45","32"],backgroundColor:"rgba(244, 191, 62, 1)",borderColor:"rgba(244, 191, 62, 1)",label:"Demo B",fill:"false",borderDash:[0,0]}],max:5},optout:{labels:["Functional","Statistics","Marketing","Do Not Track","No Choice","No Warning"],categories:["functional","statistics","marketing","do_not_track","no_choice","no_warning"],datasets:[{data:["29","747","174","292","30","10"],backgroundColor:"rgba(46, 138, 55, 1)",borderColor:"rgba(46, 138, 55, 1)",label:"A (default)",fill:"false",borderDash:[0,0]},{data:["3","536","240","389","45","32"],backgroundColor:"rgba(244, 191, 62, 1)",borderColor:"rgba(244, 191, 62, 1)",label:"Demo B",fill:"false",borderDash:[0,0]}],max:5}},l=(0,n.vt)(((e,a)=>({consentType:"optin",setConsentType:a=>{e({consentType:a})},statisticsLoading:!1,consentTypes:[],regions:[],defaultConsentType:"optin",loaded:!1,statisticsData:r,emptyStatisticsData:r,bestPerformerEnabled:!1,daysLeft:"",abTrackingCompleted:!1,labels:[],setLabels:a=>{e({labels:a})},fetchStatisticsData:async()=>{if(!cmplz_settings.is_premium)return void e({saving:!1,loaded:!0,consentType:"optin",consentTypes:["optin","optout"],statisticsData:s,defaultConsentType:"optin",bestPerformerEnabled:!1,regions:"eu",daysLeft:11,abTrackingCompleted:!1});if(e({saving:!0}),a().loaded)return;const{daysLeft:t,abTrackingCompleted:n,consentTypes:r,statisticsData:l,defaultConsentType:i,regions:c,bestPerformerEnabled:d}=await o.doAction("get_statistics_data",{}).then((e=>e)).catch((e=>{console.error(e)}));e({saving:!1,loaded:!0,consentType:i,consentTypes:r,statisticsData:l,defaultConsentType:i,bestPerformerEnabled:d,regions:c,daysLeft:t,abTrackingCompleted:n})}})))},70348:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var n=t(51609),o=t(4219),r=t(88895),s=t(86087),l=t(45111),i=t(27723);const c=(0,s.memo)((()=>{const{fields:e,getFieldValue:a,addHelpNotice:t}=(0,o.default)(),{regions:c,abTrackingCompleted:d,daysLeft:b,bestPerformerEnabled:g,loaded:p,fetchStatisticsData:f}=(0,r.default)(),[u,h]=(0,s.useState)(!1),[m,_]=(0,s.useState)(!1);(0,s.useEffect)((()=>{p||f()}),[]),(0,s.useEffect)((()=>{let e=1==a("a_b_testing");h(e);let t=1==a("a_b_testing_buttons");_(t)}),[e]);const k=(e,a,t)=>(0,n.createElement)("div",{className:"cmplz-statistics-status"},(0,n.createElement)(l.default,{name:e,color:a}),t);return(0,s.useEffect)((()=>{let e=(0,i.__)('The conversion graph shows the ratio for the different choices users have. When a user has made a choice, this will be counted as either a converted user, or a not converted. If no choice is made, the user will be listed in the "No choice" category.',"complianz-gdpr");if(e+=" ",1==a("use_country")&&c.length>0){const a=c.filter((e=>"label"!==e.value)).map((e=>e.label));e+=(0,i.__)("As you have enabled geoip, there are several regions in which a banner is shown, in different ways. In regions apart from %s no banner is shown at all.","complianz-gdpr").replace("%s",a.join(", "))}t("a_b_testing","warning",e,(0,i.__)("Banners in different regions","complianz-gdpr"))}),[c]),(0,n.createElement)(n.Fragment,null,g&&k("circle-check","green",(0,i.__)("The consent banner with the best results has been enabled as default banner.","complianz-gdpr")),!g&&u&&!m&&k("circle-times","grey",(0,i.__)("A/B testing is disabled. Previously made progress is saved.","complianz-gdpr")),!g&&m&&(0,n.createElement)(n.Fragment,null,!d&&(0,n.createElement)(n.Fragment,null,b>1&&k("circle-check","green",(0,i.__)("A/B is enabled and will end in %s days.","complianz-gdpr").replace("%s",b)),1===b&&k("circle-check","green",(0,i.__)("A/B is enabled and will end in 1 day.","complianz-gdpr").replace("%s",b)),0===b&&k("circle-check","green",(0,i.__)("A/B is enabled and will end today.","complianz-gdpr"))),d&&(0,n.createElement)(n.Fragment,null,k("circle-check","green",(0,i.__)("The A/B tracking period has ended, the best performer will be enabled on the next scheduled check.","complianz-gdpr")))))}))}}]); |