Web SDK
Environment Configuration
Manage development vs production keys, staging environments, and local proxy setups.
Overview
Properly isolating development, staging, and production environments prevents test queries from skewing live customer analytics.
Environment Separation Best Practices
# .env.development
NEXT_PUBLIC_ASIYST_PROJECT_ID=proj_9f8a2b3c4d
NEXT_PUBLIC_ASIYST_PUBLIC_KEY=pk_test_12345
# .env.production
NEXT_PUBLIC_ASIYST_PROJECT_ID=proj_9f8a2b3c4d
NEXT_PUBLIC_ASIYST_PUBLIC_KEY=pk_live_12345
Preview Deployments & Wildcards
For Vercel Preview Deployments, enable https://*.vercel.app in your Development environment Allowed Domains.