Hey, Paul!
Welcome to the Vercel Community 
Analytics Drains are project-scoped, not environment-scoped. When configuring a Web Analytics Drain, you can only select which projects should send data to your endpoint. There's no native option to filter by environment (production vs. preview/development) for Web Analytics drains.
However, each analytics event does include a vercelEnvironment field (with values like "production") in the payload, so you can filter events on the receiving end.
Since you can't configure environment-level filtering at the drain level for Web Analytics, the recommended approaches are:
- Filter at your ingestion endpoint: Configure a single drain and have your receiving endpoint inspect the
vercelEnvironment field in each event, routing production events to your production analytics store and dev/preview events elsewhere.
- Use a middleware/proxy: Set up an intermediary endpoint that receives all events and routes them to different backends based on the
vercelEnvironment value.
- Use sampling + filtering: If you primarily care about production data, set a low sampling rate and filter by environment at ingestion time.
Here are some relevant documentation: