PageSourceSearch

https://www.classace.io/_next/static/chunks/pages/admin/growth-ecd829e6a848dcf5.js

js classace.io collected 2026-10-01 11:58:49 UTC 10,926 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67237],{31516:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/growth",function(){return n(41515)}])},39860:(e,t,n)=>{"use strict";n.d(t,{Hm:()=>a,Ih:()=>i});var s=n(80035);let i=e=>{let t;return{promise:new Promise(n=>{t=(0,s.z7)(e,()=>n())}),disposer:t}},a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"whenDisposer",{promise:s,disposer:a}=i(e);return t[n]=a,s}},41515:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var s=n(4902),i=n(37876),a=n(14232),r=n(74162),l=n(77328),o=n.n(l),d=n(89099),c=n.n(d),h=n(71850),p=n(71792),m=n(21028);class g extends a.Component{componentDidMount(){this.loadDashboard()}render(){let{dashboard:e,experiments:t,reports:n,selectedExperimentId:s,analysis:a,conversionEventName:r,isLoading:l,error:o}=this.state;if(l)return(0,i.jsx)("div",{style:{padding:32},children:"Loading growth data…"});let d=Object.entries(e?.eventCounts||{}).sort((e,t)=>{let[,n]=e,[,s]=t;return s-n}),c=Object.entries(e?.landingPages||{}).sort((e,t)=>{let[n]=e,[s]=t;return n.localeCompare(s)});return(0,i.jsxs)("main",{style:{maxWidth:1200,margin:"0 auto",padding:"32px 20px",color:"#0f1923"},children:[(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:16,alignItems:"center",flexWrap:"wrap"},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{style:{margin:0},children:"Spyce Growth"}),(0,i.jsxs)("p",{style:{color:"#525f7f"},children:["Last 30 days \xb7 ",e?.totalEvents||0," recorded events"]})]}),(0,i.jsx)("button",{type:"button",onClick:this.loadDashboard,children:"Refresh"})]}),o?(0,i.jsx)("p",{style:{color:"#b42318"},children:o}):null,(0,i.jsxs)("section",{style:{marginTop:28},children:[(0,i.jsx)("h2",{children:"Funnel events"}),(0,i.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",background:"#fff"},children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{align:"left",children:"Event"}),(0,i.jsx)("th",{align:"left",children:"Count"})]})}),(0,i.jsx)("tbody",{children:d.map(this.renderMetricRow)})]})]}),(0,i.jsxs)("section",{style:{marginTop:28},children:[(0,i.jsx)("h2",{children:"Landing-page event comparison"}),(0,i.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",background:"#fff"},children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{align:"left",children:"Landing page"}),(0,i.jsx)("th",{align:"left",children:"Events"})]})}),(0,i.jsx)("tbody",{children:c.map(e=>{let[t,n]=e;return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:t}),(0,i.jsx)("td",{children:Object.entries(n).map(e=>{let[t,n]=e;return`${t}: ${n}`}).join(" \xb7 ")})]},t)})})]})]}),(0,i.jsxs)("section",{style:{marginTop:28},children:[(0,i.jsx)("h2",{children:"Growth reports and recommendations"}),0===n.length?(0,i.jsx)("p",{children:"No daily reports or weekly recommendations have been generated yet."}):n.map(e=>(0,i.jsxs)("article",{style:{background:"#fff",border:"1px solid #e6e6e6",borderRadius:8,marginTop:12,padding:16},children:[(0,i.jsx)("strong",{children:e.title}),(0,i.jsx)("pre",{style:{margin:"12px 0 0",overflowX:"auto",whiteSpace:"pre-wrap"},children:e.content?.recommendation||JSON.stringify(e.content?.eventCounts||{},null,2)})]},e.itemId))]}),(0,i.jsxs)("section",{style:{marginTop:28},children:[(0,i.jsx)("h2",{children:"Experiment analysis"}),0===t.length?(0,i.jsx)("p",{children:"No growth experiments have been created."}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{style:{display:"flex",gap:12,flexWrap:"wrap"},children:[(0,i.jsxs)("label",{children:["Experiment"," ",(0,i.jsx)("select",{value:s,onChange:this.onExperimentChange,children:t.map(e=>(0,i.jsx)("option",{value:e.itemId,children:e.title},e.itemId))})]}),(0,i.jsxs)("label",{children:["Conversion event"," ",(0,i.jsx)("input",{value:r,onChange:this.onConversionEventChange})]})]}),(0,i.jsxs)("table",{style:{width:"100%",marginTop:16,borderCollapse:"collapse",background:"#fff"},children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{align:"left",children:"Variant"}),(0,i.jsx)("th",{align:"left",children:"Exposed"}),(0,i.jsx)("th",{align:"left",children:"Conversions"}),(0,i.jsx)("th",{align:"left",children:"Rate"}),(0,i.jsx)("th",{align:"left",children:"Relative lift"}),(0,i.jsx)("th",{align:"left",children:"95% CI"}),(0,i.jsx)("th",{align:"left",children:"p-value"}),(0,i.jsx)("th",{align:"left",children:"Significant"})]})}),(0,i.jsx)("tbody",{children:(a?.variants||[]).map(e=>{let t=e.comparisonToControl;return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:e.variant}),(0,i.jsx)("td",{children:e.exposures}),(0,i.jsx)("td",{children:e.conversions}),(0,i.jsx)("td",{children:null==e.conversionRate?"—":`${(100*e.conversionRate).toFixed(2)}%`}),(0,i.jsx)("td",{children:t?.relativeLift==null?"—":`${(100*t.relativeLift).toFixed(2)}%`}),(0,i.jsx)("td",{children:t?.confidenceInterval95?`${(100*t.confidenceInterval95[0]).toFixed(2)}% to ${(100*t.confidenceInterval95[1]).toFixed(2)}%`:"—"}),(0,i.jsx)("td",{children:t?.pValue==null?"—":t.pValue.toFixed(4)}),(0,i.jsx)("td",{children:t?.statisticallySignificant?"Yes":"No"})]},e.variant)})})]}),(0,i.jsx)("p",{style:{color:"#525f7f"},children:"A statistically significant result still requires review of guardrails, attribution integrity, contribution margin, and the configured sample requirement before a human promotes a winner."})]})]})]})}constructor(...e){super(...e),this.state={dashboard:null,experiments:[],reports:[],selectedExperimentId:"",analysis:null,conversionEventName:"trial_started",isLoading:!0,error:null},this.loadDashboard=async()=>{this.setState({isLoading:!0,error:null});try{let e=Date.now(),[t,n,s]=await Promise.all([(0,p.httpsCallable)(m.functions,"growth_action")({action:"get_growth_dashboard",params:{startAtMillis:e-2592e6,endAtMillis:e}}),(0,p.httpsCallable)(m.functions,"growth_action")({action:"get_growth_experiments",params:{}}),(0,p.httpsCallable)(m.functions,"growth_action")({action:"get_growth_reports",params:{}})]),i=n.data?.experiments||[],a=s.data?.reports||[];this.setState({dashboard:t.data,experiments:i,reports:a,selectedExperimentId:this.state.selectedExperimentId||i[0]?.itemId||"",isLoading:!1},()=>{this.state.selectedExperimentId&&this.loadAnalysis()})}catch(e){this.setState({error:e?.message||"Could not load growth data",isLoading:!1})}},this.loadAnalysis=async()=>
1{if(this.state.selectedExperimentId)try{let e=Date.now(),t=await (0,p.httpsCallable)(m.functions,"growth_action")({action:"get_growth_experiment_analysis",params:{experimentId:this.state.selectedExperimentId,conversionEventName:this.state.conversionEventName,startAtMillis:e-2592e6,endAtMillis:e}});this.setState({analysis:t.data,error:null})}catch(e){this.setState({analysis:null,error:e?.message||"Could not load experiment analysis"})}},this.onExperimentChange=e=>{this.setState({selectedExperimentId:e.target.value},()=>void this.loadAnalysis())},this.onConversionEventChange=e=>{this.setState({conversionEventName:e.target.value},()=>void this.loadAnalysis())},this.renderMetricRow=e=>{let[t,n]=e;return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:t}),(0,i.jsx)("td",{children:n})]},t)}}}var x=n(39860);let u=new Set(["[email protected]","[email protected]","[email protected]"]);class j extends a.Component{async componentDidMount(){let{u:e}=this.props;await (0,x.Hm)(()=>!1===e.loadingUserData,this);let t=String(e.currentUser?.email||"").toLowerCase();if(!u.has(t))return void await c().replace("/");this.setState({allowed:!0,ready:!0})}render(){let{ready:e,allowed:t}=this.state;return(0,i.jsxs)(h.A,{u:this.props.u,children:[(0,i.jsx)(o(),{children:(0,i.jsx)("title",{children:"Spyce Growth Admin"})}),e?null:(0,i.jsx)("div",{style:{padding:32},children:"Loading…"}),t?(0,i.jsx)(g,{}):null]})}constructor(...e){super(...e),this.state={allowed:!1,ready:!1}}}let f=j=(0,s.Cg)([(0,r.WQ)("u"),r.PA],j)},65995:(e,t,n)=>{"use strict";function s(e,t){return+parseFloat(e).toFixed(t)}n.d(t,{a:()=>s})},71850:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var s=n(37876),i=n(94250),a=n.n(i),r=n(14232),l=n(77328),o=n.n(l),d=n(85448),c=n(52203),h=n(23694),p=n(18847),m=n.n(p);let g={margin:0,padding:0,border:"0px solid #DDD"},x=m()(()=>Promise.all([n.e(20419),n.e(51423),n.e(72082)]).then(n.bind(n,51423)),{loadableGenerated:{webpack:()=>[51423]}}),u=e=>{let t=null;t=!0===e.hideNav?null:(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(c.A,{aiFunctionsListMinData:e.aiFunctionsListMinData,alwaysVisible:!0}),(0,s.jsx)(d.default,{fixedTop:e.fixedTop})]});let n=e.blogHeader||null,i=h.IS_WRKAI?"WRKAI - AI For Everyone":`${h.PRODUCT_NAME} | AI Tools to Move You Forward`,l=h.IS_WRKAI?"State-of-the-Art Free & Pay-As-You-Go AI tools.":h.IS_SPYCEAI?"AI marketing workflows for research, positioning, advertising, and campaign creation.":"AI tools and resources for students, teachers, creators, and professionals. Trusted by over 10 million users.",p=h.IS_WRKAI?"https://www.wrkai.com/static/share/[email protected]":h.IS_CLASSACE?"https://www.classace.io/static/press/ph-gallery-1.png":"";return(0,s.jsxs)("div",{style:g,className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]]),children:[(0,s.jsxs)(o(),{children:[(0,s.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0",className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]])},"viewport"),(0,s.jsx)("title",{name:"title",className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]]),children:i}),(0,s.jsx)("meta",{name:"ogtitle",property:"og:title",content:i,className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]])}),(0,s.jsx)("meta",{name:"ogdescription",property:"og:description",content:l,className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]])}),(0,s.jsx)("meta",{name:"description",content:l,className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]])}),(0,s.jsx)("meta",{name:"ogimage",property:"og:image",content:p,className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]])}),(0,s.jsx)("meta",{name:"ogimagewidth",property:"og:image:width",content:"1200px",className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]])}),(0,s.jsx)("meta",{name:"ogimageheight",property:"og:image:height",content:"630px",className:a().dynamic([["716e8b0e9305f3c9",["Open Sans"]]])})]}),t,n,e.children,e.u?.clientState?.get("searchString")?.length>0&&(0,s.jsx)(x,{currentlyHoveringButtonID:e.u.getCS("currentlyHoveringButtonID"),currentlyHoveringBoundingRect:e.u.getCS("currentlyHoveringBoundingRect"),darkTheme:e.darkTheme}),(0,s.jsx)(a(),{id:"716e8b0e9305f3c9",dynamic:["Open Sans"],children:'body{margin:0px;height:auto;width:100%;min-height:100%!important;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif}p,label{line-height:2em;letter-spacing:.1px;font-size:15px}'})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[48230,68827,30969,54587,13787,6698,52203,85448,90636,46593,38792],()=>t(31516)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.