API Overview
Send page views and custom events to WysLeap: the tracker covers the browser, and the server events API covers your backend.
Quick Start
The fastest path depends on what you need:
1. Create a site
Sign up, add your site, and receive a siteId and API key instantly.
2. Add the tracker
One script tag auto-tracks pageviews, clicks, and scroll depth, with optional session replay.
3. Call the API
Send events from your servers, or page views and custom events with the telemetry endpoints.
Overview
- Base URL:
https://wysleap.com/api - Authentication: a secret key for server events, the site API key for telemetry. See Authentication.
- Response format: JSON + HTTP status codes
Endpoints
| Endpoint | Use it for |
|---|---|
POST /api/v1/events | Events from your backend (signups, purchases, subscription changes), with a secret key |
POST /api/telemetry/pageview | Page views from the browser (the tracker calls this for you) |
POST /api/telemetry/event | Custom events from the browser (WysLeap.trackEvent calls this for you) |
GET /api/health | Status check |
The spec is also available as OpenAPI 3.0 JSON at /api/openapi.
JavaScript SDK
The easiest integration. One script tag handles anonymous visitor IDs, session management, and data collection automatically.
For full setup, configuration options (trackClicks, trackScroll, session replay), and all SDK methods (trackPageView, trackEvent, setConsent), see Installation.
Use WysLeap.trackEvent('Event Name', { }) in your app to send custom events without calling the REST endpoint directly.