/plushcap/analysis/neon/neon-roll-your-own-analytics-with-astro-vercel-edge-functions-and-neon

Roll Your Own Analytics With Astro, Vercel Edge Functions and Neon

What's this blog post about?

This post explains how to create a custom analytics solution using Astro, Vercel Edge Functions, and Neon serverless Postgres database as an alternative to Google Analytics. The author demonstrates the implementation for a site built with Astro and deployed on Vercel. The solution captures site visits and allows visualization of activity on the site. Key components include a Neon serverless Postgres database, an Edge Function capable of extracting geolocation data from incoming requests, and a client-side request to the Edge Function that fires on page load. The author also provides examples of how to use the collected data for various visualizations.

Company
Neon

Date published
Oct. 3, 2023

Author(s)
Paul Scanlon

Word count
1320

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.