1 min read


PostHog is now available in the Vercel Marketplace as a feature flags, experimentation and Analytics provider.
With this integration, you can now:
Declare flags in code using Flags SDK and the @flags-sdk/posthog adapter
Toggle features in real time for specific users or cohorts
Roll out changes gradually using percentage-based rollouts
Run A/B tests to validate impact before a full release
This integration helps teams building on Vercel ship with more confidence. You can test in production, reduce release risk, and make data-driven decisions based on real user behavior, all within your existing Vercel workflows.
Create a flags.ts file with an identify function and a flag check:
import { postHogAdapter } from '@flags-sdk/posthog'import { flag, dedupe } from 'flags/next'import type { Identify } from 'flags'
export const identify = dedupe(async () => ({ distinctId: 'user_distinct_id' // replace with real user ID})) satisfies Identify<{ distinctId: string }>
export const myFlag = flag({ key: 'my-flag', adapter: postHogAdapter.isFeatureEnabled(), identify,})Create a flags.ts file with a simple identify function and a function to check your flag
Check out the Posthog template to learn more about this integration.