Company
Date Published
Oct. 3, 2023
Author
Paul Scanlon
Word count
1320
Language
English
Hacker News points
None

Summary

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.