1import{r as t,k as e,L as u,F as x,p as H,J as X}from"./index-De-OttEo.js";import{u as Z}from"./useSEO-DutU5o5n.js";import{C as ee}from"./CookieConsent-qkbFMHaX.js";import{a as se}from"./TrianglMark-z7FdY4_P.js";const $="/how-to-connect-ads-to-revenue";function ne(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function B({values:d,empty:m}){return d!=null&&d.length?e.jsx("ul",{children:d.map(l=>e.jsx("li",{children:l},l))}):e.jsx("p",{className:"dar-empty",children:m})}function de(){var q,S,C,E,R,T,L,F,P,W,D,M,O,A,I,z,G;const[d,m]=t.useState(""),[l,j]=t.useState(!1),[g,h]=t.useState(""),[s,v]=t.useState(null),[f,J]=t.useState(""),[b,Y]=t.useState(""),[p,y]=t.useState(!1),[w,N]=t.useState(!1),[K,_]=t.useState(!1);Z({title:"How to Connect Ads to Revenue | Free Baseline | triangl.ai",description:"Enter one company domain. Generate live Google search suggestions, see the public conversion path, and identify the evidence needed to connect ads to revenue.",keywords:"how to connect ads to revenue, marketing attribution, ads to CRM, closed-won revenue",canonical:$,ogImage:"https://triangl.ai/og-insight.png"});const k=t.useMemo(()=>{var n;return((n=s==null?void 0:s.domain)==null?void 0:n.replace(/^www\./,""))||""},[s]),Q=async n=>{var a,c,r,U;if(n.preventDefault(),!l){j(!0),h(""),v(null),N(!1),_(!1),x("domain_baseline_started",{source:"organic",domain:d});try{const o=await fetch(`${H}/api/acquisition/analyze`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({domain:d})}),i=await o.json().catch(()=>({}));if(!o.ok||!(i!=null&&i.result))throw new Error((i==null?void 0:i.error)||"The website could not be analyzed.");v(i.result),x("domain_baseline_completed",{source:"organic",domain:i.result.domain,stack_count:((c=(a=i.result.measurement)==null?void 0:a.stack)==null?void 0:c.length)||0,action_count:((U=(r=i.result.conversion)==null?void 0:r.actions)==null?void 0:U.length)||0})}catch(o){h((o==null?void 0:o.message)||"The website could not be analyzed.")}finally{j(!1)}}},V=async n=>{if(n.preventDefault(),!(p||w||!s)){y(!0),h("");try{const a=X(),c=await fetch(`${H}/api/leads/demo-request`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:f,company:s.domain,notes:b,offering:"roas_audit",tier_interest:"roas_audit",source:"domain_revenue_baseline",submission_id:ne(),landing_path:$,landing_url:window.location.href,session_id:a.sid||void 0,anon_uid:a.uid||void 0,ga_client_id:a.ga_client_id||void 0})}),r=await c.json().catch(()=>({}));if(!c.ok||!(r!=null&&r.lead_id))throw new Error((r==null?void 0:r.error)||"Your request did not save.");N(!0),x("domain_baseline_requested",{lead_id:r.lead_id,source:"domain_revenue_baseline",domain:s.domain})}catch(a){h((a==null?void 0:a.message)||"Your request did not save.")}finally{y(!1)}}};return e.jsxs("div",{className:"dar-page",children:[e.jsxs("header",{className:"dar-header",children:[e.jsxs(u,{className:"dar-brand",to:"/","aria-label":"triangl.ai home",children:[e.jsx(se,{size:28,title:null}),e.jsx("span",{children:"triangl.ai"})]}),e.jsx("span",{className:"dar-header-note",children:"Free public baseline"})]}),e.jsxs("main",{children:[e.jsxs("section",{className:"dar-hero","aria-labelledby":"dar-title",children:[e.jsx("p",{className:"dar-kicker",children:"How to connect ads to revenue"}),e.jsx("h1",{id:"dar-title",children:"See what buyers search. Then connect it to revenue."}),e.jsx("p",{className:"dar-lede",children:"Enter one company domain. Generate live search suggestions, see what your site captures, and find the next question worth owning."}),e.jsxs("form",{className:"dar-domain-form",onSubmit:Q,children:[e.jsx("label",{htmlFor:"dar-domain",children:"Company domain"}),e.jsxs("div",{children:[e.jsx("input",{id:"dar-domain",type:"text",value:d,onChange:n=>m(n.target.value),placeholder:"yourcompany.com",autoComplete:"url",required:!0}),e.jsx("button",{type:"submit",disabled:l,children:l?"Reading the public trailâ¦":"Analyze my website"})]})]}),e.jsx("p",{className:"dar-fine",children:"No account. No email. Public website evidence only."}),g&&e.jsx("p",{className:"dar-error",role:"alert",children:g})]}),s&&e.jsxs("section",{className:"dar-result","aria-live":"polite",children:[e.jsxs("aside",{className:"dar-project",children:[e.jsx("p",{children:"Project"}),e.jsxs("div",{children:[!K&&e.jsx("img",{src:(q=s.identity)==null?void 0:q.favicon_url,alt:"",onError:()=>_(!0)}),e.jsx("strong",{children:k})]}),e.jsx("a",{href:s.source_url,target:"_blank",rel:"noreferrer",children:"Open source page â"})]}),e.jsxs("div",{className:"dar-paper",children:[e.jsx("p",{className:"dar-paper-label",children:"Public acquisition baseline"}),e.jsx("h2",{children:((S=s.identity)==null?void 0:S.headline)||((C=s.identity)==null?void 0:C.title)||k}),e.jsxs("section",{className:"dar-demand","aria-labelledby":"dar-demand-title",children:[e.jsxs("div",{className:"dar-demand-heading",children:[e.jsxs("div",{children:[e.jsx("span",{children:"Generated from live Google suggestions"}),e.jsx("h3",{id:"dar-demand-title",children:"Search territory around your promise"})]}),e.jsxs("p",{children:["Seed: ",(E=s.demand)==null?void 0:E.seed]})]}),((T=(R=s.demand)==null?void 0:R.queries)==null?void 0:T.length)>
10?e.jsx("div",{className:"dar-query-grid",children:s.demand.queries.map(n=>e.jsxs("a",{href:n.source_url,target:"_blank",rel:"noreferrer",children:[e.jsx("span",{children:n.intent}),e.jsx("strong",{children:n.query}),e.jsx("small",{children:"Open search evidence â"})]},n.query))}):e.jsx("p",{className:"dar-demand-unavailable",children:((L=s.demand)==null?void 0:L.status)||"Live search demand was unavailable in this run."}),e.jsxs("footer",{children:[(F=s.demand)==null?void 0:F.status," Every query links to its search source."]})]}),e.jsxs("div",{className:"dar-verdict",children:[e.jsx("span",{children:"What the website evidence supports"}),e.jsx("strong",{children:s.verdict})]}),e.jsxs("div",{className:"dar-evidence-heading",children:[e.jsx("span",{children:"Evidence used"}),e.jsx("h3",{children:"What your site currently says and measures"})]}),e.jsxs("div",{className:"dar-evidence-grid",children:[e.jsxs("article",{children:[e.jsx("span",{children:"Offer"}),e.jsx("h3",{children:"What the page promises"}),e.jsx("p",{children:((P=s.identity)==null?void 0:P.description)||((W=s.identity)==null?void 0:W.title)||"No public description was returned."})]}),e.jsxs("article",{children:[e.jsx("span",{children:"Action"}),e.jsx("h3",{children:"How visitors convert"}),e.jsx(B,{values:(D=s.conversion)==null?void 0:D.actions,empty:(M=s.conversion)!=null&&M.forms?`${s.conversion.forms} form(s), with no clear action label.`:"No clear action found."})]}),e.jsxs("article",{children:[e.jsx("span",{children:"Measurement"}),e.jsx("h3",{children:"What appears connected"}),e.jsx(B,{values:(O=s.measurement)==null?void 0:O.stack,empty:"No common measurement tag was visible in the returned HTML."}),((I=(A=s.measurement)==null?void 0:A.campaign_ids)==null?void 0:I.length)>0&&e.jsxs("p",{className:"dar-campaign-fields",children:["Campaign fields: ",s.measurement.campaign_ids.join(", ")]}),e.jsx("small",{children:(z=s.measurement)==null?void 0:z.scope})]}),e.jsxs("article",{children:[e.jsx("span",{children:"Next test"}),e.jsx("h3",{children:"What to prove next"}),e.jsx("p",{children:s.next_test})]})]}),e.jsxs("div",{className:"dar-locked",children:[e.jsxs("div",{className:"dar-locked-heading",children:[e.jsx("span",{children:"Needs ad-spend + CRM evidence"}),e.jsx("strong",{children:"What the website cannot prove"})]}),(G=s.locked)==null?void 0:G.map(n=>e.jsxs("div",{className:"dar-locked-row",children:[e.jsx("span",{"aria-hidden":"true",children:"â"}),e.jsx("p",{children:n}),e.jsx("b",{children:"Locked"})]},n))]}),e.jsx("section",{className:"dar-request","aria-labelledby":"dar-request-title",children:w?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"dar-paper-label",children:"Request received"}),e.jsx("h2",{id:"dar-request-title",children:"Now get the private numbers straight."}),e.jsx("p",{children:"Weâll confirm the decision and the ad-spend and CRM exports needed. The 48-hour clock starts when usable data arrives."})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"dar-paper-label",children:"Strategist-led revenue baseline"}),e.jsx("h2",{id:"dar-request-title",children:"Unlock the revenue answer."}),e.jsx("p",{children:"Tree reviews the evidence and names the recommendation the data can supportâincluding holding the budget."}),e.jsxs("form",{onSubmit:V,children:[e.jsxs("label",{children:["What marketing budget decision do you need to make?",e.jsx("textarea",{value:b,onChange:n=>Y(n.target.value),placeholder:"Should we increase LinkedIn spend, move budget to search, or hold?",rows:3,maxLength:2e3,required:!0})]}),e.jsxs("label",{children:["Work email",e.jsx("input",{type:"email",value:f,onChange:n=>J(n.target.value),autoComplete:"email",placeholder:"[email protected]",required:!0})]}),e.jsx("button",{type:"submit",disabled:p,children:p?"Savingâ¦":"Request my baseline"})]})]})}),e.jsxs("footer",{children:[e.jsxs("span",{children:["Source: ",s.source_url]}),e.jsxs("span",{children:["Read ",s.as_of]})]})]})]})]}),e.jsxs("footer",{className:"dar-footer",children:[e.jsx("span",{children:"© triangl.ai"}),e.jsxs("nav",{children:[e.jsx(u,{to:"/trust",children:"Trust"}),e.jsx(u,{to:"/privacy",children:"Privacy"}),e.jsx(u,{to:"/terms",children:"Terms"})]})]}),e.jsx(ee,{})]})}
1export{de as default};
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.