Pick Your SDK
Install the latest version with@latest, or specify a version:
- React
- Next.js
- Node.js
Get Your API Key
All SDKs require an API key from your project dashboard: π Dashboard β Settings β API KeysSetup by Framework
React
Next.js (App Router)
WrapGatelyProvider in a client component to avoid SSR issues:
Node.js (Express)
Node.js (Fastify)
Environment Variables
Troubleshooting
window is not defined (Next.js)
window is not defined (Next.js)
Wrap
GatelyProvider in a 'use client' component β it cannot run in a Server Component directly. See the Next.js setup above.useGately is not a function
useGately is not a function
Make sure youβre running
@gately/react@2.2.0 or @gately/nextjs@2.2.0. Update to the latest version:Invalid API key
Invalid API key
Verify your key in the dashboard and ensure itβs set in your environment variables, not hardcoded.