PageSourceSearch

https://marketmate.ai/assets/AIPresence-Wnvfz8EU.js

js marketmate.ai collected 2026-10-05 12:14:17 UTC 19,979 bytes, 1 lines download raw bytes

1import{r as o,j as e,B as k,k as B,l as E,a as Z,i as K,Z as X}from"./index-DICDb-J1.js";import{u as V}from"./useApi-Bf_npvSM.js";import{W as I}from"./Widget-ZeIRvN7V.js";import{N as ee}from"./NotConnected-CnFF97Fo.js";import{R as G}from"./refresh-cw-Dz-e7vUe.js";import{C as S}from"./circle-check-big-Cjzc7vRI.js";import{C as P}from"./circle-x-D8VbtAMr.js";const v={"AI Crawlability":"#8b5cf6","Structured Data":"#1E88B6","Content Signals":"#10b981","Platform Presence":"#f59e0b"};function M({score:s,size:n=72}){const r=n/2-6,c=2*Math.PI*r,i=c*(s/100),x=s>=75?"#10b981":s>=50?"#f59e0b":"#ef4444";return e.jsxs("svg",{width:n,height:n,className:"rotate-[-90deg]",children:[e.jsx("circle",{cx:n/2,cy:n/2,r,fill:"none",stroke:"rgba(0,0,0,0.08)",strokeWidth:5}),e.jsx("circle",{cx:n/2,cy:n/2,r,fill:"none",stroke:x,strokeWidth:5,strokeDasharray:c,strokeDashoffset:c-i,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.8s ease"}})]})}function se({label:s,earned:n,total:r}){const c=r>0?Math.round(n/r*100):0,i=v[s]||"#64748b";return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[11px] font-mono text-txt-2",children:s}),e.jsxs("span",{className:"text-[11px] font-mono text-txt-3",children:[n,"/",r," pts"]})]}),e.jsx("div",{className:"h-1.5 bg-bg-4 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${c}%`,backgroundColor:i}})})]})}function H({finding:s}){const n=v[s.category]||"#64748b";return e.jsxs("div",{className:"flex items-start gap-3 py-2.5 border-b border-line last:border-0",children:[s.pass?e.jsx(S,{size:13,className:"text-success flex-shrink-0 mt-0.5"}):e.jsx(P,{size:13,className:"text-danger flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("p",{className:"text-[12px] font-medium text-txt",children:s.title}),e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded-xs",style:{color:n,backgroundColor:`${n}18`},children:s.category}),e.jsxs("span",{className:"text-[9px] font-mono text-txt-3",children:[s.points," pts"]})]}),e.jsx("p",{className:"text-[11px] text-txt-3 mt-0.5 leading-snug",children:s.detail})]})]})}const z={HIGH:{color:"#ef4444",Icon:X,label:"High"},MED:{color:"#f59e0b",Icon:B,label:"Medium"},LOW:{color:"#06b6d4",Icon:K,label:"Low"}};function te({rec:s}){const n=z[s.priority]||z.LOW,{Icon:r}=n,c=v[s.category]||"#64748b";return e.jsxs("div",{className:"flex items-start gap-3 py-3 border-b border-line last:border-0",children:[e.jsx("div",{className:"w-6 h-6 rounded-sm flex items-center justify-center flex-shrink-0 mt-0.5",style:{backgroundColor:`${n.color}15`},children:e.jsx(r,{size:11,style:{color:n.color}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{className:"text-[9px] font-mono uppercase tracking-wider",style:{color:n.color},children:n.label}),s.category&&e.jsx("span",{className:"text-[9px] font-mono uppercase px-1.5 py-0.5 rounded-xs",style:{color:c,backgroundColor:`${c}18`},children:s.category})]}),e.jsx("p",{className:"text-[12.5px] font-semibold text-txt mt-0.5 leading-snug",children:s.title}),e.jsx("p",{className:"text-[11.5px] text-txt-2 mt-0.5 leading-relaxed",children:s.description}),s.estimatedImpact&&e.jsx("span",{className:"inline-block mt-1.5 text-[10px] font-mono text-success bg-[rgba(34,197,94,0.09)] px-2 py-0.5 rounded-xs",children:s.estimatedImpact})]})]})}const D=[{at:0,msg:"Fetching homepage and landing pages…"},{at:5,msg:"Checking llms.txt, robots.txt, sitemap…"},{at:10,msg:"Analysing schema markup and Open Graph tags…"},{at:16,msg:"Checking platform connections…"},{at:22,msg:"Running AI analysis on results…"},{at:30,msg:"Almost done — waiting for all checks to complete…"}];function T({elapsed:s}){const n=[...D].reverse().find(r=>s>=r.at)||D[0];return e.jsxs("div",{className:"bg-bg-2 rounded shadow-card p-8 flex items-center gap-4",children:[e.jsx(G,{size:16,className:"animate-spin text-acc flex-shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[13px] text-txt-2",children:n.msg}),e.jsxs("p",{className:"text-[11px] text-txt-3 mt-1",children:["Scan typically takes 20–35 seconds · ",s,"s elapsed"]}),e.jsx("div",{className:"mt-2 h-1 bg-bg-4 rounded-full overflow-hidden w-48",children:e.jsx("div",{className:"h-full bg-acc rounded-full transition-all duration-1000",style:{width:`${Math.min(s/35*100,95)}%`}})})]})]})}function ae({page:s}){var g,u,m,b,d;if(!s)return e.jsx("div",{className:"bg-bg-2 rounded shadow-card p-8 text-center",children:e.jsx("p",{className:"text-[13px] text-txt-3",children:"No data yet — click Re-scan to fetch landing page health."})});if(s.error)return e.jsxs("div",{className:"bg-bg-2 rounded shadow-card p-6 flex items-center gap-3",children:[e.jsx(P,{size:16,className:"text-danger flex-shrink-0"}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-[13px] font-medium text-txt",children:["Could not reach ",s.path]}),e.jsx("p",{className:"text-[11px] text-txt-3 mt-0.5",children:s.error})]})]});const n=[{category:"Crawlability",label:"Page indexable",pass:s.indexable,detail
1:s.indexable?"Allowed in meta robots":`Blocked — ${s.robotsMeta||"noindex set"}`,fix:"Remove noindex from the page meta robots tag so AI crawlers can index it."},{category:"Crawlability",label:"Canonical URL",pass:!!s.canonical,detail:s.canonical||"No canonical tag found",fix:'Add <link rel="canonical"> to prevent duplicate content issues.'},{category:"Content",label:"Title tag",pass:s.titleLength>=30&&s.titleLength<=70,detail:s.title?`"${s.title}" — ${s.titleLength} chars`:"No title tag found",fix:"Keep title between 30–70 characters with primary keyword near the start."},{category:"Content",label:"Meta description",pass:s.descriptionLength>=100&&s.descriptionLength<=160,detail:s.description?`${s.descriptionLength} chars`:"No meta description found",fix:'Write a 100–160 character description that answers "what can I do here?"'},{category:"Content",label:"H1 heading",pass:!!s.h1Present,detail:s.h1?`"${s.h1}"`:"No H1 found",fix:"Add a single H1 that clearly states what the page is about."},{category:"Content",label:"Pricing information",pass:!!s.hasPricingInfo,detail:s.hasPricingInfo?"Price/rate content detected on page":"No pricing signals found",fix:'Include visible pricing (e.g. "from €35/week") so AI can cite costs when answering price queries.'},{category:"Content",label:"Phone & address",pass:!!((g=s.contact)!=null&&g.phone&&((u=s.contact)!=null&&u.address)),detail:s.contact?`Phone=${s.contact.phone}, Address=${s.contact.address}`:"Not checked",fix:"Add phone number and Limerick address so AI can surface contact details in local queries."},{category:"Content",label:"Opening hours",pass:!!((m=s.contact)!=null&&m.hours),detail:(b=s.contact)!=null&&b.hours?"Opening hours detected on page":"No opening hours found",fix:'Add opening hours (e.g. "Mon–Fri 9am–6pm") so AI can answer availability queries.'},{category:"Content",label:"Reviews / social proof",pass:!!s.hasReviews,detail:s.hasReviews?"Review or testimonial content detected":"No review content found",fix:"Add customer reviews or a star rating so AI associates your page with credibility signals."},{category:"Structured Data",label:"LocalBusiness schema",pass:!!s.hasLocalBizSchema,detail:s.hasLocalBizSchema?`Found: ${(d=s.schemaTypes)==null?void 0:d.join(", ")}`:"No LocalBusiness/SelfStorage schema",fix:"Add LocalBusiness or SelfStorage JSON-LD so AI knows your business type, location, and services."},{category:"Structured Data",label:"FAQPage schema",pass:!!s.hasFaqSchema,detail:s.hasFaqSchema?"FAQPage schema detected":"No FAQPage schema",fix:"Add FAQPage JSON-LD with common storage questions so AI can cite your answers directly."},{category:"Structured Data",label:"Open Graph complete",pass:!!s.ogComplete,detail:s.og?`title=${s.og.title}, desc=${s.og.description}, image=${s.og.image}`:"No OG tags found",fix:"Add og:title, og:description, and og:image for rich previews on social and AI platforms."}],r=n.filter(l=>l.pass).length,c=Math.round(r/n.length*100),i=c>=80?"#10b981":c>=50?"#f59e0b":"#ef4444",x=c>=80?"Healthy":c>=50?"Needs work":"Poor";return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-bg-2 rounded shadow-card p-5 flex items-center gap-4",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx(M,{score:c,size:80}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:"font-display font-bold text-[18px]",style:{color:i},children:c})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-txt-3",children:"Page Health"}),e.jsx("p",{className:"text-[14px] font-semibold text-txt mt-0.5",children:x}),e.jsxs("p",{className:"text-[10px] font-mono text-txt-3 mt-0.5",children:[r," of ",n.length," checks passing"]}),e.jsxs("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] font-mono text-acc hover:underline mt-1",children:[e.jsx(E,{size:9}),s.url]})]})]}),e.jsxs("div",{className:"lg:col-span-2 bg-bg-2 rounded shadow-card p-5",children:[e.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-txt-3 mb-3",children:"HTTP Status"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`text-[28px] font-display font-bold ${s.status===200?"text-success":"text-danger"}`,children:s.status}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[12px] text-txt",children:s.status===200?"Page accessible":"Page not accessible"}),e.jsx("p",{className:"text-[11px] text-txt-3 mt-0.5",children:"Fetched via browser UA with 25s timeout"})]})]})]})]}),e.jsx(I,{title:"Page Health Checks",subtitle:`${r} of ${n.length} passing · Crawlability, Content, Structured Data`,children:e.jsx("div",{className:"px-5 py-3",children:n.map(l=>e.jsxs("div",{className:"flex items-start gap-3 py-2.5 border-b border-line last:border-0",children:[l.pass?e.jsx(S,{size:13,className:"text-success flex-shrink-0 mt-0.5"}):e.jsx(P,{size:13,className:"text-danger flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("p",{className:"text-[12px] font-medium text-txt",children:l.label}),e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded-xs bg-bg-3 text-txt-3",children:l.category})]}),e.jsx("p",{className:"text-[11px] text-txt-3 mt-0.5 leading-snug",children:l.detail}),!l.pass&&l.fix&&e.jsx("p",{className:"text-[10px] text-txt-4 mt-0.5 italic leading-snug",children:l.fix})]})]},l.label))})})]})}function xe(){var R,$,O,F;const{data:s,isLoading:n}=V("ai-presence","/ai-presence/scan"),[r,c]=o.useState(!1),[i,x]=o.use
1State(""),[g,u]=o.useState(null),[m,b]=o.useState("main"),[d,l]=o.useState("issues"),[L,A]=o.useState(0),C=o.useRef(null),t=g||s,j=t!=null&&t.siteUrl?t.siteUrl.replace(/^https?:\/\//,"").replace(/\/$/,""):"your website",W=[{key:"main",label:j},...(R=t==null?void 0:t.landingPages)!=null&&R.length?[{key:"landing",label:"/home-new"}]:[]],_=async()=>{c(!0),x(""),A(0),C.current=setInterval(()=>A(a=>a+1),1e3);try{const a=await Z.get("/ai-presence/scan?force=true");u(a)}catch(a){x((a==null?void 0:a.error)||"Could not run the scan. Please try again.")}finally{c(!1),clearInterval(C.current),A(0)}};o.useEffect(()=>()=>clearInterval(C.current),[]);const N=typeof(t==null?void 0:t.score)=="number",h=N?t.score:null,q=N?h:"—",Q=N?h>=75?"#10b981":h>=50?"#f59e0b":"#ef4444":"#64748b",U=N?h>=75?"Strong presence":h>=50?"Needs work":"Low visibility":"Not scanned yet",y=(t==null?void 0:t.findings)||[],p=y.filter(a=>!a.pass),w=y.filter(a=>a.pass),J=($=t==null?void 0:t.landingPages)==null?void 0:$.find(a=>a.path==="/home-new");return t!=null&&t._unconfigured?e.jsxs("div",{className:"p-6 space-y-5 max-w-[1280px]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-sm flex items-center justify-center",style:{backgroundColor:"#8b5cf620"},children:e.jsx(k,{size:15,color:"#8b5cf6"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-[22px] font-bold text-txt",children:"AI Presence"}),e.jsx("p",{className:"text-txt-3 text-[12px]",children:"How easily AI assistants can find and cite this business"})]})]}),e.jsx(ee,{channel:"AI Presence",color:"#8b5cf6"})]}):t!=null&&t._pending?e.jsxs("div",{className:"p-6 space-y-5 max-w-[1280px]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-sm flex items-center justify-center",style:{backgroundColor:"#8b5cf620"},children:e.jsx(k,{size:15,color:"#8b5cf6"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-[22px] font-bold text-txt",children:"AI Presence"}),e.jsxs("p",{className:"text-txt-3 text-[12px]",children:["How easily AI assistants can find and cite ",j]})]})]}),e.jsxs("div",{className:"bg-bg-2 border border-line rounded p-8 text-center",children:[e.jsx("div",{className:"w-11 h-11 rounded-full mx-auto mb-3 flex items-center justify-center",style:{backgroundColor:"#8b5cf620"},children:e.jsx(k,{size:20,color:"#8b5cf6"})}),e.jsx("h2",{className:"font-display text-[16px] font-bold text-txt mb-1",children:"No scan yet"}),e.jsxs("p",{className:"text-[13px] text-txt-2 max-w-md mx-auto",children:["Nobody has run a presence scan for ",j," yet. A scan checks the site and costs money to run, so an admin needs to start the first one — after that it’s here for everyone."]})]})]}):e.jsxs("div",{className:"p-6 space-y-5 max-w-[1280px]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-sm flex items-center justify-center",style:{backgroundColor:"#8b5cf620"},children:e.jsx(k,{size:15,color:"#8b5cf6"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-[22px] font-bold text-txt",children:"AI Presence"}),e.jsxs("p",{className:"text-txt-3 text-[12px]",children:["How easily AI assistants can find and cite ",j]})]})]}),e.jsxs("button",{onClick:_,disabled:r||n,className:"flex items-center gap-1.5 text-[11px] font-mono text-white bg-acc hover:bg-acc-2 px-3 py-1.5 rounded-xs transition-colors disabled:opacity-50",children:[e.jsx(G,{size:10,className:r?"animate-spin":""}),r?"Scanning…":t?"Re-scan":"Run Scan"]})]}),i&&e.jsxs("div",{className:"flex items-center gap-2 text-[12px] text-amber-700 bg-amber-50 border border-amber-200 rounded-xs px-3 py-2",children:[e.jsx(B,{size:13}),i]}),e.jsx("div",{className:"flex items-center gap-1 border-b border-line",children:W.map(a=>e.jsx("button",{onClick:()=>b(a.key),className:`px-4 py-2 text-[12px] font-mono transition-colors border-b-2 -mb-px ${m===a.key?"border-acc text-txt font-medium":"border-transparent text-txt-3 hover:text-txt-2"}`,children:a.label},a.key))}),m==="main"&&e.jsxs(e.Fragment,{children:[(n||r)&&!t?e.jsx(T,{elapsed:L}):t&&!n?e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-bg-2 rounded shadow-card p-5 flex items-center gap-4",children:[e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx(M,{score:h,size:80}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:"font-display font-bold text-[18px]",style:{color:Q},children:q})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-txt-3",children:"AI Presence Score"}),e.jsx("p",{className:"text-[14px] font-semibold text-txt mt-0.5",children:U}),e.jsxs("p",{className:"text-[10px] font-mono text-txt-3 mt-0.5",children:[p.length," of ",y.length," checks failing"]}),t.scannedAt&&e.jsx("p",{className:"text-[10px] font-mono text-txt-3 mt-0.5",children:new Date(t.scannedAt).toLocaleDateString("en-IE",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})})]})]}),e.jsxs("div",{className:"lg:col-span-2 bg-bg-2 rounded shadow-card p-5",children:[e.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-txt-3 mb-3",children:"Category Breakdown"}),e.jsx("div",{className:"grid grid-cols-2 gap-x-6 gap-y-3",children:Object.entries(t.categories||{}).map(([a,{earned:f,total:Y}])=>e.jsx(se,{label:a,earned:f,total:Y},a))})]})]}):null,(t==null?void 0:t.summary)&&e.jsxs("div",{className:"bg-bg-2 border border-line rounded p-4",children:[e.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider text-txt-3 mb-1.5",children:"AI Assessment"}),e.jsx("p",{className:"text-[13px] text-txt-2 leading-relaxed",children:t.summary})]}),t&&e.jsxs(I,{title:"Presence Checks",subtitle:`${y.length} checks across 4 categories · ${w.length} passing, ${p.length} failing`,children:[e.jsx("div",{className:"flex border-b border-line",children:[{key:"issues",label:"Issues",count:p.length},{key:"recommendations",label:"Recommendations",count:((O=t.recommendations)==null?void 0:O.length)||0},{key:"passing",label:"Passing",count:w.length}].map(a=>e.jsxs("button",{onClick:()=>l(a.key),className:`px-5 py-3 text-[12px] font-mono border-b-2 transition-colors ${d===a.key?"border-acc text-acc":"border-transparent text-txt-3 hover:text-txt-2"}`,children:[a.label,a.count>0&&e.jsx("span",{className:"ml-1.5 text-[10px] bg-bg-3 px-1.5 py-0.5 rounded-xs",children:a.count})]},a.key))}),d==="issues"&&e.jsx("div",{className:"px-5 py-3",children:p.length===0?e.jsxs("div",{className:"flex items-center gap-2 text-success py-4",children:[e.jsx(S,{size:14}),e.jsx("p",{className:"text-[13px]",children:"All checks passing — excellent AI presence!"})]}):p.map(a=>e.jsx(H,{finding:a},a.key))}),d==="recommendations"&&e.jsx("div",{className:"px-5 py-1",children:((F=t.recommendations)==null?void 0:F.length)>0?t.recommendations.map((a,f)=>e.jsx(te,{rec:a},f)):e.jsx("p",{className:"text-[12px] text-txt-3 py-4",children:"No recommendations — all checks passing."})}),d==="passing"&&e.jsx("div",{className:"px-5 py-3",children:w.length===0?e.jsx("p",{className:"text-[12px] text-txt-3",children:"No checks passing yet — run a scan first."}):w.map(a=>e.jsx(H,{finding:a},a.key))})]}),!t&&!n&&e.jsx(I,{title:"What is AI Presence?",children:e.jsxs("div",{className:"px-5 py-5 space-y-3",children:[e.jsx("p",{className:"text-[13px] text-txt-2 leading-relaxed",children:"AI Presence measures how easily AI assistants like ChatGPT, Perplexity, Claude, and Google Gemini can find, understand, and recommend your business when someone searches for what you offer."}),e.jsx("p",{className:"text-[12px] text-txt-3 leading-relaxed",children:"The scan checks 12 signals across four categories — whether AI crawlers are allowed to index the site, whether structured data helps AI understand your services, whether you have the content AI assistants cite, and whether you appear on the platforms AI tools use as data sources."}),e.jsx("div",{className:"grid grid-cols-2 gap-3 pt-1",children:Object.entries(v).map(([a,f])=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:f}}),e.jsx("span",{className:"text-[11px] text-txt-2",children:a})]},a))}),e.jsxs("a",{href:"https://llmstxt.org",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-[11px] font-mono text-acc hover:underline pt-1",children:[e.jsx(E,{size:10}),"Learn about llms.txt"]})]})})]}),m==="landing"&&e.jsx(e.Fragment,{children:(n||r)&&!t?e.jsx(T,{elapsed:L}):e.jsx(ae,{page:J})})]})}export{xe 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.