# Track server\-side custom events with Vercel Web Analytics

**Published:** October 6, 2023 | **Authors:** Chris Widmaier, Tobias Lins

---

Vercel Web Analytics now supports tracking custom events on the server-side, in addition to existing support for client-side tracking.

**app/page.tsx**
```jsx
import { track } from '@vercel/analytics/server';
export default function FeedbackPage() {
  async function submitFeedback(data: FormData) {
    'use server';
    await track('Feedback', {
      message: data.get('feedback') as string,
    });
  }
  return (
    <form action={submitFeedback}>
      <input type="text" name="feedback" placeholder="Feedback" />
      <button type="submit">Submit Feedback</button>
    </form>
  );
}
```

Events can now be tracked from [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), [API Routes](https://nextjs.org/docs/pages/building-your-application/routing/api-routes), and [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/forms-and-mutations) when using Next.js (or other frameworks like SvelteKit and Nuxt) through the `track` function.

Custom event tracking is available for Pro and Enterprise users.

[Check out the documentation](https://vercel.com/docs/analytics/custom-events) to learn more.

---

📚 **More updates:** [View all changelog entries](/changelog/sitemap.md) | [Blog](/blog/sitemap.md)