PostHog now supports Vercel Edge Functions
We're excited to announce support for Vercel Edge Functions in PostHog. This enables you to use PostHog's tracking capabilities in edge environments, bringing powerful product analytics to your edge-deployed applications.
What are Edge Functions?
Vercel Edge Functions are lightweight, globally-distributed serverless functions that run on Vercel's edge network. They execute closer to your users, providing lower latency and faster response times compared to traditional serverless functions.
Using PostHog with Edge Functions
You can now use PostHog to capture events and track user behavior directly from your Edge Functions. This is particularly useful for:
- Tracking user interactions that occur in edge-executed code
- Capturing events with minimal latency impact
- Analyzing behavior patterns across edge-deployed features
Getting Started
To use PostHog with Vercel Edge Functions:
- Install the PostHog SDK in your project
- Initialize the PostHog client in your Edge Function
- Start capturing events using the standard PostHog API
Events captured from Edge Functions are processed the same way as events from other sources, allowing you to analyze them alongside your other product data.
Learn More
For detailed implementation examples and best practices, visit our documentation or check out our Edge Functions integration guide.
Fetched July 15, 2026



