PageSourceSearch

https://vetano.com/assets/AppDownloadsAnalytics-M6E5zo6-.js

js vetano.com collected 2026-09-24 14:22:01 UTC 11,940 bytes, 12 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LazyRechartsCharts-BW1uOlvo.js","assets/vendor-framer-e_lHCn70.js","assets/vendor-react-KJNI7MOv.js","assets/card-Cvhc0jcH.js","assets/index-fBnR0sxX.js","assets/vendor-radix-core-Dl2pI1uY.js","assets/vendor-utils-MBSoW7Mz.js","assets/vendor-query-B0dKBn0F.js","assets/vendor-supabase-DEDxcdm9.js","assets/vendor-radix-extended-hypInIJy.js","assets/index-DqJryuM2.css","assets/vendor-charts-BDAdqkMp.js"])))=>i.map(i=>d[i]);
2import{d as $,_ as te,g as ae,w as M,ab as re}from"./index-fBnR0sxX.js";import{j as e}from"./vendor-framer-e_lHCn70.js";import{r as h}from"./vendor-react-KJNI7MOv.js";import{C as x,d as u,a as A,b as L}from"./card-Cvhc0jcH.js";import{T as ne,a as le,b as I,c as i,d as ie,e as c}from"./table-of2xIJG2.js";import{I as ce}from"./input-u-di5Od2.js";import{S as oe,a as de,b as me,c as xe,d as P}from"./select-DzOVp7cU.js";import{M as ue}from"./map-pin-REDMVgDh.js";import{F as he}from"./filter-BeIHmpy-.js";import"./vendor-radix-core-Dl2pI1uY.js";import"./vendor-utils-MBSoW7Mz.js";import"./vendor-query-B0dKBn0F.js";import"./vendor-supabase-DEDxcdm9.js";import"./vendor-radix-extended-hypInIJy.js";/**
3 * @license lucide-react v0.462.0 - ISC
4 *
5 * This source code is licensed under the ISC license.
6 * See the LICENSE file in the root directory of this source tree.
7 */const D=$("Apple",[["path",{d:"M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 14 5 22 8 22c1.25 0 2.5-1.06 4-1.06Z",key:"3s7exb"}],["path",{d:"M10 2c1 .5 2 2 2 5",key:"fcco2y"}]]);/**
8 * @license lucide-react v0.462.0 - ISC
9 *
10 * This source code is licensed under the ISC license.
11 * See the LICENSE file in the root directory of this source tree.
12 */const pe=$("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]),R=["hsl(41, 98%, 57%)","hsl(142, 76%, 36%)","hsl(221, 83%, 53%)","hsl(280, 67%, 50%)","hsl(0, 84%, 60%)"],je=h.lazy(()=>te(()=>import("./LazyRechartsCharts-BW1uOlvo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),fe=()=>e.jsx("div",{className:"h-[200px] flex items-center justify-center text-muted-foreground",children:e.jsx("div",{className:"animate-pulse",children:"Loading charts..."})}),V=n=>{const m=n.event_name?.toLowerCase()||"",o=(n.properties?.element_section||"").toLowerCase();if(m.includes("app store")||m.includes("ios"))return"ios";if(m.includes("google play")||m.includes("android"))return"android";if(m.startsWith("img.h-")){const N=n.properties;if(N?.click_y,(o.includes("hero")||o==="header")&&N?.element_tag==="img")return null}return null},ke=({clickEvents:n,dailyViews:m=[]})=>{const[o,N]=h.useState("all"),[b,q]=h.useState(""),{iosClicks:y,androidClicks:v,bySection:k,dailyDownloads:H,utmAttribution:U,parsedClicks:O,uniqueSources:z}=h.useMemo(()=>{const s=n.filter(t=>V(t)==="ios").length,_=n.filter(t=>V(t)==="android").length,p=[],F=new Set;n.forEach((t,a)=>{if(!t.event_name)return;const r=t.event_name.toLowerCase();if(!r.includes("app store")&&!r.includes("google play"))return;const l=r.includes("app store")||r.includes("ios"),Q=t.event_name.split(" - ")[1]||"Unknown",g=t.properties,S=g?.utm_source||"",X=g?.utm_medium||"",Y=g?.utm_campaign||"",ee=g?.utm_term||"",se=g?.utm_content||"";S&&F.add(S);const T=t.created_at?new Date(t.created_at):new Date;p.push({id:`${a}-${T.getTime()}`,platform:l?"iOS":"Android",section:Q,date:T.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),time:T.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),utm_source:S,utm_medium:X,utm_campaign:Y,utm_term:ee,utm_content:se})});const j={};n.forEach(t=>{if(!t.event_name)return;const a=t.event_name.toLowerCase();if(!a.includes("app store")&&!a.includes("google play"))return;const r=a.includes("app store")||a.includes("ios"),l=t.event_name.split(" - ")[1]||"Unknown";j[l]||(j[l]={ios:0,android:0}),r?j[l].ios++:j[l].android++});const Z=Object.entries(j).map(([t,a])=>({section:t,ios:a.ios,android:a.android,total:a.ios+a.android})).sort((t,a)=>a.total-t.total),f={};
12n.forEach(t=>{if(!t.event_name||!t.created_at)return;const a=t.event_name.toLowerCase();if(!a.includes("app store")&&!a.includes("google play"))return;const r=new Date(t.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=a.includes("app store")||a.includes("ios");f[r]||(f[r]={ios:0,android:0}),l?f[r].ios++:f[r].android++});const G=Object.entries(f).map(([t,a])=>({date:t,iOS:a.ios,Android:a.android})).slice(-14),C={};n.forEach(t=>{if(!t.event_name)return;const a=t.event_name.toLowerCase();if(!a.includes("app store")&&!a.includes("google play"))return;const r=t.properties,l=r?.utm_campaign||r?.utm_source||"Direct";C[l]=(C[l]||0)+1});const J=Object.entries(C).map(([t,a])=>({name:t,value:a})).sort((t,a)=>a.value-t.value).slice(0,5),K=Array.from(F).sort();return{iosClicks:s,androidClicks:_,bySection:Z,dailyDownloads:G,utmAttribution:J,parsedClicks:p,uniqueSources:K}},[n]),w=h.useMemo(()=>O.filter(s=>!(o!=="all"&&s.utm_source!==o||b&&!s.utm_campaign.toLowerCase().includes(b.toLowerCase()))),[O,o,b]),d=y+v,E=d>0?Math.round(y/d*100):0,B=d>0?Math.round(v/d*100):0,W=[{name:"iOS",value:y,color:"hsl(221, 83%, 53%)"},{name:"Android",value:v,color:"hsl(142, 76%, 36%)"}].filter(s=>s.value>0);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsx(x,{className:"bg-card/50 border-border/30",children:e.jsx(u,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Total App Clicks"}),e.jsx("p",{className:"text-3xl font-bold text-foreground",children:d})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center",children:e.jsx(ae,{className:"w-6 h-6 text-primary"})})]})})}),e.jsx(x,{className:"bg-card/50 border-border/30",children:e.jsx(u,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"iOS (App Store)"}),e.jsx("p",{className:"text-3xl font-bold text-foreground",children:y}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[E,"% of total"]})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center",children:e.jsx(D,{className:"w-6 h-6 text-blue-500"})})]})})}),e.jsx(x,{className:"bg-card/50 border-border/30",children:e.jsx(u,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Android (Play Store)"}),e.jsx("p",{className:"text-3xl font-bold text-foreground",children:v}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[B,"% of total"]})]}),e.jsx("div",{className:"w-12 h-12 rounded-xl bg-green-500/10 flex items-center justify-center",children:e.jsx(M,{className:"w-6 h-6 text-green-500"})})]})})})]}),e.jsx(h.Suspense,{fallback:e.jsx(fe,{}),children:e.jsx(je,{dailyDownloads:H,platformData:W})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs(x,{className:"bg-card/50 border-border/30",children:[e.jsx(A,{children:e.jsxs(L,{className:"text-lg flex items-center gap-2",children:[e.jsx(ue,{className:"w-5 h-5 text-primary"}),"Clicks by Section"]})}),e.jsx(u,{children:k.length>0?e.jsx("div",{className:"space-y-3",children:k.map(s=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-foreground",children:s.section}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(D,{className:"w-3 h-3 text-blue-500"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:s.ios})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(M,{className:"w-3 h-3 text-green-500"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:s.android})]}),e.jsx("span",{className:"text-sm font-medium text-foreground min-w-[40px] text-right",children:s.total})]})]},s.section))}):e.jsx("div",{className:"h-[100px] flex items-center justify-center text-muted-foreground",children:"No section data yet"})})]}),e.jsxs(x,{className:"bg-card/50 border-border/30",children:[e.jsx(A,{children:e.jsxs(L,{className:"text-lg flex items-center gap-2",children:[e.jsx(re,{className:"w-5 h-5 text-primary"}),"Campaign Attribution"]})}),e.jsx(u,{children:U.length>0?e.jsx("div",{className:"space-y-3",children:U.map((s,_)=>{const p=d>0?Math.round(s.value/d*100):0;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-foreground",children:s.name}),e.jsxs("span",{className:"text-muted-foreground",children:[s.value," (",p,"%)"]})]}),e.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${p}%`,backgroundColor:R[_%R.length]}})})]},s.name)})}):e.jsx("div",{className:"h-[100px] flex items-center justify-center text-muted-foreground",children:"No campaign data yet"})})]})]}),e.jsxs(x,{className:"bg-card/50 border-border/30",children:[e.jsx(A,{children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs(L,{className:"text-lg flex items-center gap-2",children:[e.jsx(pe,{className:"w-5 h-5 text-primary"}),"App Store Clicks Detail"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(he,{className:"w-4 h-4 text-muted-foreground"}),e.jsxs(oe,{value:o,onValueChange:N,children:[e.jsx(de,{className:"w-[140px] h-8 text-xs",children:e.jsx(me,{placeholder:"UTM Source"})}),e.jsxs(xe,{children:[e.jsx(P,{value:"all",children:"All Sources"}),z.map(s=>e.jsx(P,{value:s,children:s},s))]})]}),e.jsx(ce,{placeholder:"Filter campaign...",value:b,onChange:s=>q(s.target.value),className:"w-[150px] h-8 text-xs"})]})]})}),e.jsx(u,{children:w.length>0?e.jsxs("div",{className:"overflow-x-auto",children:[e.jsxs(ne,{children:[e.jsx(le,{children:e.jsxs(I,{children:[e.jsx(i,{className:"text-xs",children:"Date"}),e.jsx(i,{className:"text-xs",children:"Time"}),e.jsx(i,{className:"text-xs",children:"Platform"}),e.jsx(i,{className:"text-xs",children:"Section"}),e.jsx(i,{className:"text-xs",children:"UTM Source"}),e.jsx(i,{className:"text-xs",children:"UTM Medium"}),e.jsx(i,{className:"text-xs",children:"UTM Campaign"}),e.jsx(i,{className:"text-xs",children:"UTM Term"}),e.jsx(i,{className:"text-xs",children:"UTM Content"})]})}),e.jsx(ie,{children:w.slice(0,50).map(s=>e.jsxs(I,{children:[e.jsx(c,{className:"text-xs",children:s.date}),e.jsx(c,{className:"text-xs",children:s.time}),e.jsx(c,{className:"text-xs",children:e.jsxs("div",{className:"flex items-center gap-1",children:[s.platform==="iOS"?e.jsx(D,{className:"w-3 h-3 text-blue-500"}):e.jsx(M,{className:"w-3 h-3 text-green-500"}),s.platform]})}),e.jsx(c,{className:"text-xs",children:s.section}),e.jsx(c,{className:"text-xs font-mono",children:s.utm_source||"-"}),e.jsx(c,{className:"text-xs font-mono",children:s.utm_medium||"-"}),e.jsx(c,{className:"text-xs font-mono",children:s.utm_campaign||"-"}),e.jsx(c,{className:"text-xs font-mono",children:s.utm_term||"-"}),e.jsx(c,{className:"text-xs font-mono",children:s.utm_content||"-"})]},s.id))})]}),w.length>50&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-2 text-center",children:["Showing 50 of ",w.length," clicks"]})]}):e.jsx("div",{className:"h-[100px] flex items-center justify-center text-muted-foreground",children:"No app store clicks recorded yet"})})]})]})};export{ke 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.