'use client' import Link from 'next/link' import { formatNumber } from '@/lib/utils/format' import { BookOpenIcon, ArrowRightIcon } from '@ciphera-net/ui' import type { GoalCountStat } from '@/lib/api/stats' interface GoalStatsProps { goalCounts: GoalCountStat[] siteId: string dateRange: { start: string; end: string } } const LIMIT = 10 export default function GoalStats({ goalCounts, siteId, dateRange }: GoalStatsProps) { const list = (goalCounts || []).slice(0, LIMIT) const hasData = list.length > 0 return (

Goals & Events

{hasData ? ( list.map((row) => (
{row.event_name.replace(/_/g, ' ')} {formatNumber(row.count)}
)) ) : (

Need help tracking goals?

Add pulse.track('event_name') where actions happen on your site, then see counts here. Check our guide for step-by-step instructions.

Read documentation
)}
) }