Browser observability without a long setup
Lens gives you one browser SDK that captures the basics immediately:- page views
- Web Vitals
- unhandled errors and promise rejections
- custom interaction and business events when you need them
Web SDK Quickstart
Install
@lens/web, add your API key, initialize once, and verify data in Lens.What you need
A Lens project
Create a project in Lens so you have a place for incoming telemetry.
An API key
Generate a project API key from the Lens dashboard before wiring the SDK.
A frontend app
The current public SDK is
@lens/web, designed for browser-based apps.Collector endpoint
Point the SDK at
https://collector.lens.sh for production ingestion.Recommended rollout
- Integrate Lens in one production frontend first.
- Verify page views, errors, and Web Vitals arrive as expected.
- Add user identity after auth state is available.
- Layer in custom interaction and business events only where they add product value.
Next steps
Quickstart
Follow the production setup flow for the web SDK.
Local Docs Development
Preview and edit this Mintlify site locally.