Server-Side Analytics with Jamstack Sites
A Jamstack site's ability to gather analytics is vulnerable due to the lack of a backend, which can be mitigated by using a Netlify Function that sends events off to Google Analytics. The function returns an SVG image with query string parameters, allowing for server-side analytics without relying on traditional trackers or tracking pixels. This approach bypasses blockers and provides a way to track user behavior while maintaining privacy and speed concerns. By using a redirect rule in the `netlify.toml` file, the site can be proxied to use the Netlify Function, enabling server-side analytics with minimal technical effort.
Company
Vonage
Date published
Nov. 30, 2020
Author(s)
Luke Oliff
Word count
1436
Language
English
Hacker News points
None found.