We integrate with BetterStack for logs/uptime and Google Analytics for traffic.
BetterStack (Logs & Uptime)
- Create an account at BetterStack.
- Create a new source (e.g., Next.js / Node.js).
- Get the Source Token.
- Add to
.env:
BETTERSTACK_TELEMETRY_SOURCE_TOKEN=your_token
BETTERSTACK_TELEMETRY_INGESTING_HOST=https://in.logs.betterstack.com
Google Analytics 4 (GA4)
- Create a Property in Google Analytics.
- Get the Measurement ID (starts with
G-). - Add the public Measurement ID to
.envfor browser tracking:
NEXT_PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID=G-XXXXXXXXXX
To show GA4 reports inside the admin SEO screen, also create a Google Cloud service account, enable the Google Analytics Data API, grant the service account access to the GA4 property, and add:
GA4_PROPERTY_ID=123456789
GA4_CREDENTIALS_JSON={"client_email":"...","private_key":"..."}
PageSpeed Insights
- Create a Google API key with access to the PageSpeed Insights API.
- Add it to
.env:
GOOGLE_PAGESPEED_API_KEY=your_api_key
