Vercel Adds Free, Built-In Web Analytics
Vercel now provides built-in web analytics for all Next.js projects, including those on its free tier. The feature allows development teams to review visitor and performance data directly within their deployment dashboard, eliminating the need for third-party analytics scripts.
- The analytics feature is the result of Vercel's acquisition of Splitbee, a privacy-focused analytics company, in October 2022. The founders of Splitbee joined Vercel to integrate their technology into the platform. - To respect user privacy and comply with regulations like GDPR, the feature avoids cookies. Instead, it identifies unique users by creating a hash from the incoming request, which resets every 24 hours, preventing cross-site and cross-day tracking. - The JavaScript script for Vercel Analytics is reportedly 44 times smaller than the script for Google Analytics, minimizing the impact on page load times and Core Web Vitals. - While the current version does not track users across multiple days, Vercel is experimenting with opt-in cookies to potentially offer user retention metrics in the future. - The free "Hobby" tier includes up to 2,500 events per month, while the "Pro" tier includes 25,000 events. Custom event tracking is available on paid plans to monitor specific user interactions like button clicks or form submissions. - Integration is done by adding the `@vercel/analytics` package to a project and including the `Analytics` component, with specific wrappers available for frameworks like Next.js, React, and SvelteKit. - Future plans include adding engagement metrics such as visit duration and bounce rate, though no specific timeline has been announced for these updates.