The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix ai page analytics

Luna fb2bdbf4 b139b937

+4 -5
+2 -2
app/ai-gallery/[uploadId]/side.component.tsx
··· 101 101 className="select-none" 102 102 radius="sm" 103 103 > 104 - {Array.isArray(analytics?.results) ? 105 - (analytics.results[0].visits || analytics.results[0].visitors) 104 + {Array.isArray(analytics.results) && analytics.results.length ? 105 + (analytics.results[0].pageviews) 106 106 : 107 107 "unknown" 108 108 }
+2 -3
lib/analytics.ts
··· 1 1 export interface AnalyticsResponse { 2 2 page: string; 3 - visitors: number; 4 - visits: number; 3 + pageviews: number; 5 4 } 6 5 7 6 export interface AnalyticsError { ··· 16 15 date: "2021-01-01,2026-03-02", 17 16 property: "event:page", 18 17 filters: "event:page==" + page, 19 - metrics: "visits,visitors" 18 + metrics: "pageviews" 20 19 }; 21 20 22 21 const res = await fetch(`${process.env.PLAUSIBLE_API}/v1/stats/breakdown?${objectToQueryString(params)}`, {