Browser SDK Reference
Published package @mydle/browser-sdk sends real-user telemetry to RUM ingest. Product guides live under Browser Monitoring.
Install#
npm install @mydle/browser-sdk
import { mydle } from "@mydle/browser-sdk";
mydle.init({
projectKey: "pk_live_…",
endpoint: "https://www.mydle.app/api/rum/v1/ingest",
});Product install guide: Browser installation.
Methods#
mydle.init(options)— start instrumentation (replaces a previous instance).mydle.track(name, props?)— custom events.mydle.captureException(error, context?)mydle.flush()— drain pending beacons.mydle.stop()— tear down patches.
Also: initMydleBrowser legacy helper in the same package. Script tag: /sdk/mydle-browser.js.
Ingest#
POST /api/rum/v1/ingest with a publishable key. See API Reference.
Privacy#
The SDK does not send passwords, cookies, tokens, or form bodies. Origin allowlists are required. More: Browser privacy.
Limitations
- No session replay / video.
- Free includes 5,000 accepted events per month and Pro 50,000; over the allowance ingest returns 429 with Retry-After. Team and Enterprise have no monthly event cap.
- Per-key rate limiting returns 429.