PageSourceSearch

https://designovafonts.com/assets/AdminTraffic-BMhVAShv.js

js designovafonts.com collected 2026-10-03 19:59:35 UTC 13,985 bytes, 1 lines download raw bytes

1import{j as t,i as N}from"./index-B97XxtmM.js";import{b as c}from"./react-vendor-D-X1bcXo.js";import{A as V}from"./AdminPageHeader-DqK9VE2y.js";import{o as _,R as C,p as E,X as M,Y as z,T as D,q as R,K as B}from"./useThemeColors-Ol1YFN-J.js";import{L,a as x}from"./LineChart-DVtEbPoO.js";import{r as P,a as W,c as q,R as I}from"./analyticsRanges-DjW4yN9e.js";import"./isEqual-BqApWzX3.js";import"./tiny-invariant-BaFNuDhB.js";const T=[{key:"human",label:"No Bot Signal",opacity:.45},{key:"bot",label:"Detected Automated",opacity:.85},{key:"unknown",label:"Unknown",opacity:.18}],H={fontFamily:"var(--font-sans)",fontSize:"10px",fontWeight:600,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--color-muted)"};function K({kpis:i}){const s=i.total;return s===0?t.jsx("p",{style:{fontFamily:"var(--font-sans)",fontSize:"12px",color:"var(--color-muted)",margin:0},children:"No traffic data available for this period."}):t.jsxs("div",{children:[t.jsx("div",{style:{display:"flex",height:"10px",background:"var(--color-surface)"},children:T.map(({key:n,opacity:e})=>{const a=i[n]/s*100;return a===0?null:t.jsx("div",{style:{width:`${a}%`,background:"var(--color-fg)",opacity:e}},n)})}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px 24px",marginTop:"12px"},children:T.map(({key:n,label:e,opacity:a})=>t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"7px"},children:[t.jsx("span",{style:{width:"8px",height:"8px",background:"var(--color-fg)",opacity:a,flexShrink:0}}),t.jsx("span",{style:{...H,fontWeight:400},children:e}),t.jsxs("span",{style:{fontFamily:"var(--font-sans)",fontSize:"11px",color:"var(--color-fg)",fontVariantNumeric:"tabular-nums"},children:[i[n]," · ",(i[n]/s*100).toFixed(0),"%"]})]},n))})]})}function G({data:i}){const{bg:s,fg:n,rule:e}=_();return t.jsx(C,{width:"100%",height:220,children:t.jsxs(L,{data:i,margin:{top:8,right:8,bottom:0,left:0},children:[t.jsx(E,{stroke:e,strokeDasharray:"1 4",vertical:!1}),t.jsx(M,{dataKey:"label",tick:{fontSize:10,fill:n,fontFamily:"var(--font-sans)"},tickLine:!1,axisLine:{stroke:e},interval:"preserveStartEnd",minTickGap:28}),t.jsx(z,{tick:{fontSize:10,fill:n,fontFamily:"var(--font-sans)"},tickLine:!1,axisLine:!1,width:40,allowDecimals:!1}),t.jsx(D,{cursor:{stroke:e,strokeWidth:1},contentStyle:{background:s,border:`1px solid ${e}`,borderRadius:0,fontSize:12,fontFamily:"var(--font-sans)",padding:"8px 12px"}}),t.jsx(R,{wrapperStyle:{fontSize:11,fontFamily:"var(--font-sans)",letterSpacing:"0.05em",textTransform:"uppercase"}}),t.jsx(x,{type:"monotone",dataKey:"total",name:"Total",stroke:n,strokeWidth:1.5,dot:!1,isAnimationActive:!1}),t.jsx(x,{type:"monotone",dataKey:"human",name:"No Bot Signal",stroke:n,strokeWidth:1.5,strokeOpacity:.45,dot:!1,isAnimationActive:!1}),t.jsx(x,{type:"monotone",dataKey:"bot",name:"Detected Automated",stroke:n,strokeWidth:1.5,strokeOpacity:.25,strokeDasharray:"4 3",dot:!1,isAnimationActive:!1})]})})}function $({startedLabel:i}){const[s,n]=c.useState(!1),e={fontFamily:"var(--font-sans)",fontSize:"11px",fontWeight:600,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--color-muted)",background:"none",border:"none",padding:0,cursor:"pointer"},a={fontFamily:"var(--font-sans)",fontSize:"11px",color:"var(--color-muted)",lineHeight:1.7,margin:0};return t.jsxs("div",{style:{marginTop:"36px",borderTop:"1px solid var(--color-rule)",paddingTop:"14px"},children:[t.jsxs("button",{onClick:()=>n(!s),style:e,"aria-expanded":s,children:["About traffic classification ",s?"−":"+"]}),s&&t.jsxs("ul",{style:{margin:"12px 0 0",padding:0,listStyle:"none",display:"grid",gap:"6px",maxWidth:"640px"},children:[t.jsxs("li",{style:a,children:["First-party traffic tracking began ",i||"recently"," — no earlier page-visit history is available."]}),t.jsx("li",{style:a,children:"Classification is based on user-agent signatures only."}),t.jsx("li",{style:a,children:"“No Bot Signal” means no known automation signature matched — it does not prove human activity. Sophisticated scrapers using normal browser user-agents appear as No Bot Signal."}),t.jsx("li",{style:a,children:"The tracker stores page paths and random visitor/session ids only — no emails, IP addresses, geolocation or raw user-agent strings."})]})]})}const l={fontFamily:"var(--font-sans)",fontSize:"10px",fontWeight:600,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--color-muted)",textAlign:"left",paddingBottom:"10px",borderBottom:"1px solid var(--color-rule)"},o={fontFamily:"var(--font-sans)",fontSize:"12px",color:"var(--color-fg)",padding:"9px 0",borderBottom:"1px solid var(--color-rule)",fontVariantNumeric:"tabular-nums",wordBreak:"break-all"};function f({children:i}){return t.jsx("p",{style:{fontFamily:"var(--font-sans)",fontSize:"11px",fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--color-muted)",margin:"0 0 6px"},children:i})}function m({children:i}){return t.jsx("p",{style:{fontFamily:"var(--font-sans)",fontSize:"11px",color:"var(--color-muted)",margin:"0 0 16px",lineHeight:1.6},children:i})}function y({colSpan:i,text:s}){return t.jsx("tr",{children:t.jsx("td",{style:{...o,color:"var(--color-muted)"},colSpan:i,children:s})})}function O({rows:i}){return t.jsxs("div",{children:[t.jsx(f,{children:"Top Pages"}),t.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{style:{...l,width:"50%"},children:"Page / Path"}),t.jsx("th",{style:l,children:"Visits"}),t.jsx("th",{style:l,children:"Unique Visitors"}),t.jsx("th",{style:l,children:"% of Visits"})]})}),t.jsx("tbody",{children:i.length===0?t.jsx(y,{colSpan:4,text:"No traffic data available for this period."}):i.map(s=>t.jsxs("tr",{children:[t.jsx("td",{style:o,children:s.path}),t.jsx("td",{style:o,children:s.visits}),t.jsx("td",{style:o,children:s.uniqueVisitors}),t.jsxs("td",{style:o,children:[s.pct.toFixed(1),"%"]})]},s.path))})]})]})}function Y({rows:i}){return t.jsxs("div",{children:[t.jsx(f,{children:"Render-Heavy Traffic"}),t.jsx(m,{children:"These pages can trigger server-side glyph rendering when visitors use the Font Tester or glyph preview."}),t.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{style:{...l,width:"40%"},children:"Page / Path"}),t.jsx("th",{style:l,children:"Visits"}),t.jsx("th",{style:l,children:"Unique Visitors"}),t.jsx("th",{style:l,children:"No Bot Signal"}),t.jsx("th",{style:l,children:"Detected Automated"})]})}),t.jsx("tbody",{children:i.length===0?t.jsx(y,{colSpan:5,text:"No render-heavy traffic recorded."}):i.map(s=>t.jsxs("tr",{children:[t.jsx("td",{style:o,children:s.path}),t.jsx("td",{style:o,children:s.visits}),t.jsx("td",{style:o,children:s.uniqueVisitors}),t.jsx("td",{style:o,children:s.human}),t.jsx("td",{style:o,children:s.bot})]},s.path))})]})]})}function U({rows:i}){return t.jsxs("div",{children:[t.jsx(f,{children:"Detected Automated Traffic"}),t.jsx(m,{children:"Traffic is classified as automated when its user-agent matches a known automation or crawler signature. This does not guarantee that all automated traffic is detected."}),t.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{style:{...l,width:"35%"},children:"Signature"}),t.jsx("th",{style:l,children:"Visits"}),t.jsx("th",{style:{...l,width:"35%"},children:"Most-Visited Path"})]})}),t.jsx("tbody",{children:i.length===0?t.jsx(y,{colSpan:3,text:"No detected automated visits in this period."}):i.map(s=>t.jsxs("tr",{children:[t.jsx("td",{style:o,children:s.botName}),t.jsx("td",{style:o,children:s.visits}),t.jsx("td",{style:o,children:s.topPath})]},s.botName))})]})]})}function X({rows:i}){return t.jsxs("div",{children:[t.jsx(f,{children:"Traffic by Country"}),i.length===0?t.jsx(m,{children:"Traffic country data is not currently collected by the first-party tracker."}):t.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{style:{...l,width:"50%"},children:"Country"}),t.jsx("th",{style:l,children:"Visits"}),t.jsx("th",{style:l,children:"Unique Visitors"}),t.jsx("th",{style:l,children:"% of Visits"})]})}),t.jsx("tbody",{children:i.map(s=>t.jsxs("tr",{children:[t.jsx("td",{style:o,children:s.country}),t.jsx("td",{style:o,children:s.visits}),t.jsx("td",{style:o,children:s.uniqueVisitors}),t.jsxs("td",{style:o,children:[s.pct.toFixed(1),"%"]})]},s.country))})]})]})}const Q=["/typefaces","/b/"];function J(i,s,n){return i.filter(e=>{const a=new Date(e.created_date).getTime();return a>=s&&a<=n})}function Z(i){const s=new Set;let n=0,e=0,a=0;for(const r of i)r.visitor_id&&s.add(r.visitor_id),r.ua_class==="bot"?e+=1:r.ua_class==="human"?n+=1:a+=1;return{total:i.length,uniqueVisitors:s.size,human:n,bot:e,unknown:a}}function tt(i,s,n){const e=new Map(n.map(a=>[a.key,{human:0,bot:0,unknown:0}]));
1for(const a of i){const r=et(a.created_date,s),h=e.get(r);h&&(a.ua_class==="bot"?h.bot+=1:a.ua_class==="human"?h.human+=1:h.unknown+=1)}return n.map(a=>{const r=e.get(a.key)||{human:0,bot:0,unknown:0};return{label:a.label,human:r.human,bot:r.bot,unknown:r.unknown,total:r.human+r.bot+r.unknown}})}function et(i,s){const n=new Date(i),e=String(n.getMonth()+1).padStart(2,"0");return s==="month"?`${n.getFullYear()}-${e}`:`${n.getFullYear()}-${e}-${String(n.getDate()).padStart(2,"0")}`}function st(i){const s=new Map;for(const e of i){const a=s.get(e.path)||{path:e.path,visits:0,visitors:new Set};a.visits+=1,e.visitor_id&&a.visitors.add(e.visitor_id),s.set(e.path,a)}const n=i.length;return Array.from(s.values()).map(e=>({path:e.path,visits:e.visits,uniqueVisitors:e.visitors.size,pct:n>0?e.visits/n*100:0})).sort((e,a)=>a.visits-e.visits)}function it(i){const s=new Map;for(const n of i){const e=n.bot_name||"unspecified",a=s.get(e)||{botName:e,visits:0,paths:new Map};a.visits+=1,a.paths.set(n.path,(a.paths.get(n.path)||0)+1),s.set(e,a)}return Array.from(s.values()).map(n=>{var e;return{botName:n.botName,visits:n.visits,topPath:((e=Array.from(n.paths.entries()).sort((a,r)=>r[1]-a[1])[0])==null?void 0:e[0])||"—"}}).sort((n,e)=>e.visits-n.visits)}function nt(i){const s=i.filter(e=>Q.some(a=>(e.path||"").startsWith(a))),n=new Map;for(const e of s){const a=n.get(e.path)||{path:e.path,visits:0,visitors:new Set,human:0,bot:0,unknown:0};a.visits+=1,e.visitor_id&&a.visitors.add(e.visitor_id),e.ua_class==="bot"?a.bot+=1:e.ua_class==="human"?a.human+=1:a.unknown+=1,n.set(e.path,a)}return Array.from(n.values()).map(e=>({path:e.path,visits:e.visits,uniqueVisitors:e.visitors.size,human:e.human,bot:e.bot,unknown:e.unknown})).sort((e,a)=>a.visits-e.visits)}const at=I.filter(i=>i.id!=="ytd"),rt={fontFamily:"var(--font-sans)",fontSize:"12px",color:"var(--color-fg)",background:"transparent",border:"1px solid var(--color-rule)",padding:"7px 10px",outline:"none",cursor:"pointer"},w={fontFamily:"var(--font-sans)",fontSize:"11px",fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--color-muted)",margin:"0 0 16px"};function xt(){const[i,s]=c.useState(null),[n,e]=c.useState("all");c.useEffect(()=>{N.entities.PageVisit.list("-created_date",5e3).then(p=>s(p)).catch(()=>s([]))},[]);const a=Date.now(),r=c.useMemo(()=>P(n).getTime(),[n]),h=q(n),d=c.useMemo(()=>J(i||[],r,a),[i,r]),g=c.useMemo(()=>n!=="all"||!i||i.length===0?r:new Date(i[i.length-1].created_date).getTime(),[n,r,i]),v=c.useMemo(()=>W(h,g,a),[h,g]),u=c.useMemo(()=>Z(d),[d]),S=c.useMemo(()=>tt(d,h,v),[d,h,v]),k=c.useMemo(()=>st(d).slice(0,15),[d]),A=c.useMemo(()=>nt(d).slice(0,15),[d]),j=c.useMemo(()=>d.filter(p=>p.ua_class==="bot"),[d]),F=c.useMemo(()=>it(j),[j]),b=i&&i.length>0?new Date(i[i.length-1].created_date).toLocaleDateString("en-GB",{year:"numeric",month:"short",day:"numeric"}):null;return t.jsxs("div",{className:"px-8 py-10",style:{maxWidth:"1200px"},children:[t.jsx(V,{title:"Traffic",subtitle:"Website activity and traffic quality (first-party, privacy-minimal)"}),t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"24px",flexWrap:"wrap",marginTop:"24px",marginBottom:"20px"},children:[t.jsxs("p",{style:{fontFamily:"var(--font-sans)",fontSize:"11px",color:"var(--color-muted)",lineHeight:1.6,margin:0,maxWidth:"560px"},children:["First-party traffic tracking began ",b||"23 Sep 2026",". Classification uses user-agent signatures and is not a guarantee of human or automated activity."]}),t.jsx("select",{value:n,onChange:p=>e(p.target.value),style:rt,"aria-label":"Date range",children:at.map(p=>t.jsx("option",{value:p.id,children:p.label},p.id))})]}),i===null?t.jsx("div",{style:{height:"96px",background:"var(--color-surface)",border:"1px solid var(--color-rule)"}}):t.jsxs(t.Fragment,{children:[t.jsx(B,{items:[{label:"Visits",value:u.total},{label:"Visitors",value:u.uniqueVisitors},{label:"No Bot Signal",value:u.human},{label:"Detected Automated",value:u.bot},{label:"Unknown",value:u.unknown}]}),t.jsxs("div",{style:{marginTop:"28px"},children:[t.jsx("p",{style:w,children:"Traffic Quality"}),t.jsx(K,{kpis:u})]}),t.jsxs("div",{style:{marginTop:"28px"},children:[t.jsx("p",{style:w,children:"Traffic Trend"}),u.total>0?t.jsx(G,{data:S}
1):t.jsx("div",{style:{height:"120px",border:"1px solid var(--color-rule)",display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"11px",color:"var(--color-muted)"},children:"No traffic data available for this period."})})]}),t.jsxs("div",{style:{marginTop:"28px",display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(320px, 1fr))",gap:"32px"},children:[t.jsx(O,{rows:k}),t.jsx(Y,{rows:A})]}),t.jsxs("div",{style:{marginTop:"28px",display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(320px, 1fr))",gap:"32px"},children:[t.jsx(U,{rows:F}),t.jsx(X,{rows:[]})]}),t.jsx($,{startedLabel:b})]})]})}export{xt 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.