var ga4Analytics={variacao:null,versao:"Version A",debug:false,tlid:null,init:function(multitest,variacao='default'){this.variacao=variacao;if(multitest!='1'){this.versao="Version B";} if(typeof String.prototype.includes!==typeof undefined){if(window.location.host.includes('preview.')){this.debug=true;}}},error:function(msg){this.send('exception',msg,{'description':msg});},view:function(params={}){this.send('form_view','View',params);},conversion:function(params={}){this.send('form_conversion','Conversion',params);},changeStep:function(step,params={}){this.send('form_step','Change step to '+step,params);},event:function(name,label,value=null){this.send(name,label,{'event_value':value})},send:function(name,label,params={}){var params=Object.assign({'event_category':this.versao,'event_label':label,'event_page':this.variacao,'event_tlid':this.tlid,},params);gtag('event',name,params);if(this.debug){console.log("GA4Analytics event_name: "+name);console.log("GA4Analytics event_data: "+JSON.stringify(params));}}};Array.prototype.filter.call(document.querySelectorAll('[data-analytics-name]'),function(el){el.addEventListener('click',function(){ga4Analytics.event(el.dataset.analyticsName,el.dataset.analyticsLabel,el.dataset.analyticsValue||null,);})});