PageSourceSearch

https://dipanshudev.com/_next/static/chunks/3092.8102583dd2361f79.js

js dipanshudev.com collected 2026-10-02 00:49:01 UTC 4,187 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3092],{3092:(e,s,t)=>{t.r(s),t.d(s,{default:()=>d});var r=t(5155),a=t(2115);let i={visitors:"Unique visitors",sessions:"Sessions",pageViews:"Page views",conversions:"Qualified actions"},d=e=>{let{loadAnalytics:s,refreshKey:t}=e,[d,l]=(0,a.useState)({loading:!0,data:null,error:""});if((0,a.useEffect)(()=>{let e=!0;return l(e=>({...e,loading:!0,error:""})),s().then(s=>{e&&l({loading:!1,data:s,error:""})}).catch(s=>{e&&l({loading:!1,data:null,error:s.message||"Unable to load analytics"})}),()=>{e=!1}},[s,t]),d.loading)return(0,r.jsx)("div",{className:"rounded-xl border border-white/10 bg-black/20 p-5 text-sm text-white-50",children:"Loading first-party engagement..."});if(d.error)return(0,r.jsxs)("div",{className:"rounded-xl border border-amber-400/25 bg-amber-500/10 p-5 text-sm text-amber-100",children:[d.error," Run the latest `server/supabase/schema.sql` once in Supabase, then new site activity will appear here."]});let n=d.data||{},c=n.totals||{},o=(e,s)=>(0,r.jsx)("div",{className:"space-y-2",children:e?.length?e.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4 rounded-lg border border-white/10 bg-black/20 px-3 py-2 text-sm",children:[(0,r.jsx)("span",{className:"min-w-0 truncate text-white-80",children:e.label}),(0,r.jsx)("span",{className:"shrink-0 font-semibold text-cyan-200",children:e.count})]},e.label)):(0,r.jsx)("p",{className:"text-sm text-white-50",children:s})});return(0,r.jsxs)("section",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-cyan-400/20 bg-cyan-500/10 p-4",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"Site Engagement"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-white-70",children:"Last 7 days. Anonymous first-party traffic, pages, and conversion actions only."})]}),(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:Object.entries(i).map(e=>{let[s,t]=e;return(0,r.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/20 p-4",children:[(0,r.jsx)("p",{className:"text-xs uppercase tracking-wider text-white-50",children:t}),(0,r.jsx)("p",{className:"mt-2 text-3xl font-semibold",children:c[s]||0})]},s)})}),(0,r.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/20 p-4",children:[(0,r.jsx)("p",{className:"text-xs uppercase tracking-wider text-white-50",children:"Visitor-to-lead conversion"}),(0,r.jsxs)("p",{className:"mt-2 text-3xl font-semibold text-emerald-200",children:[c.conversionRate||0,"%"]})]}),(0,r.jsxs)("div",{className:"grid gap-5 lg:grid-cols-3",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/20 p-4",children:[(0,r.jsx)("h3",{className:"mb-3 font-semibold",children:"Top pages"}),o(n.topPages,"No visits recorded yet.")]}),(0,r.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/20 p-4",children:[(0,r.jsx)("h3",{className:"mb-3 font-semibold",children:"High-intent actions"}),o(n.topActions,"No conversion actions recorded yet.")]}),(0,r.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/20 p-4",children:[(0,r.jsx)("h3",{className:"mb-3 font-semibold",children:"Traffic sources"}),o(n.topReferrers,"No referrer data recorded yet.")]})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/20 p-4",children:[(0,r.jsx)("h3",{className:"mb-3 font-semibold",children:"Recent activity"}),(0,r.jsx)("div",{className:"space-y-2",children:n.recentEvents?.length?n.recentEvents.map((e,s)=>(0,r.jsxs)("div",{className:"grid gap-1 border-b border-white/10 pb-2 text-sm last:border-b-0",children:[(0,r.jsx)("span",{className:"font-medium text-cyan-100",children:e.eventName}),(0,r.jsxs)("span",{className:"truncate text-white-70",children:[e.path," \xb7 ",e.source]}),(0,r.jsx)("span",{className:"text-xs text-white-50",children:(e=>{let s=new Date(e);return Number.isNaN(s.getTime())?"-":s.toLocaleString("en-IN",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})})(e.createdAt)})]},`${e.createdAt}-${s}`)):(0,r.jsx)("p",{className:"text-sm text-white-50",children:"No events recorded yet."})})]})]})}}}]);

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.