SDK & Installation
Sessions are not appearing in the dashboard
Sessions are not appearing in the dashboard
Work through the following checks in order:
Verify your credentials
Open your browser’s developer tools and check the Console tab for any errors logged by the SDK (look for messages starting with
Milana:). A misconfigured productId or clientKey will throw an error immediately on initialization and prevent any sessions from being recorded.Check that the SDK initialized successfully
In the console, confirm there are no
Milana: Failed to initialize session messages. If you see one, the SDK could not reach the ingest endpoint — check your network tab for failed requests to in.getmilana.ai.Account for sampling
Enable debug mode to see whether the current session was sampled. Run this in your browser console, then refresh the page:You may need to change the console log level from Default levels to Verbose to see all messages. After refresh, look for If you need to adjust sampling rates for your product, contact help@getmilana.ai.
Milana: messages in the console — they will indicate whether the session was sampled and whether initialization succeeded.To disable debug mode later:Allow time for processing
Milana waits until 30 minutes of inactivity have occurred before finalizing a session, and it may take an additional 10 minutes for it to be fully processed.
Check for ad blockers
Some browser ad blockers may block requests to
in.getmilana.ai. Try disabling ad blockers, or contact help@getmilana.ai for help configuring a reverse proxy.Check your Content Security Policy
If your site sends a
Content-Security-Policy header, the SDK’s network requests or script may be blocked. Add the following directives:connect-src https://in.getmilana.ai— required for all installs, so the SDK can send recorded data.script-src https://cdn.getmilana.ai— required for script-tag installs, so the SDK script can load.- For script-tag installs, the queue snippet is an inline
<script>, soscript-srcmust also include'unsafe-inline'or a nonce.
Refused to ... because it violates the following Content Security Policy directive: to confirm whether CSP is the cause.Console error: Invalid product ID
Console error: Invalid product ID
The SDK throws this error when Your
productId does not meet the required format:productId must:- Start with the prefix
prd_ - Be exactly 30 characters in total
Console error: Invalid client key
Console error: Invalid client key
The SDK throws this error when Your
clientKey does not meet the required format:clientKey must start with the prefix key_. Copy it directly from your Settings page. If the key is correct but the error persists, the key may have been rotated — contact help@getmilana.ai to generate a new one.Console warning: Event type exceeds max size, aborting
Console warning: Event type exceeds max size, aborting
The SDK aborts the session and logs this warning when a single recorded event would exceed Milana’s per-event size limit:This almost always means the DOM contains very large inline content — most commonly Option 2 — use a The same approach works for any heavy or sensitive element — embedded SVGs, third-party widgets, and so on. See Privacy Controls for the full set of block, mask, and ignore options.
<img> tags with data:image/...;base64,... URIs, but also embedded SVGs or third-party widgets that ship megabytes of inline markup. Milana captures the full DOM (including every element’s attributes) when recording starts, and inline data URIs — often hundreds of KB to several MB each — get embedded directly in that snapshot. A single large image is enough to blow past the limit.The fix is to mark the offending elements so they are blocked from the recording. Blocked elements are replaced with a same-sized placeholder, and their attributes (including the giant src) are dropped — layout and interactions are preserved, but the visual content of that element is not recorded.Option 1 — add the milana-block class to the affected element(s):blockSelector if you can’t add a class to every element. For example, to block all inline-data-URI images across your app:Milana is not defined (CDN / script tag)
Milana is not defined (CDN / script tag)
This error occurs when your code references With this pattern, any commands pushed before the script loads are processed immediately when the SDK initializes.
window.Milana before the SDK script has finished loading. Use the queue pattern instead so that commands are buffered and replayed automatically once the script loads:If you are using the
milana-js npm package with React or a bundler, this error should not occur — the SDK is imported as a module and is always available when your code runs.Sessions appear but replay is blank
Sessions appear but replay is blank
A blank replay is usually caused by one of the following:Canvas elements: Canvas recording is disabled by default because it is CPU-intensive. If your app renders critical UI in a Iframes: Same-origin iframes are recorded automatically. Cross-origin iframes require additional setup — see the iframe Recording guide.
<canvas> element, enable it explicitly:FAQ
Have a question not answered here? Reach out at help@getmilana.ai.What data does Milana record?
What data does Milana record?
Milana records browser-side user activity using the SDK embedded in your app.What Milana records:
- DOM snapshots and mutations — the structure and content of the page as it changes
- User interactions — clicks (including modifier keys), scrolls, and form input value changes (subject to privacy controls)
- Page navigation — URL path changes, query parameter changes (with a denylist for sensitive values), and navigation type (e.g. back/forward)
- Page visibility — whether the tab is in the foreground or background
- Scroll depth — how far down the page a user scrolled
- Download detection — when a user triggers a file download
- Canvas content — only if canvas recording is enabled
- Session and user metadata — only what you explicitly pass via
init()andupdate() - Custom events — any events you explicitly send with
trackEvent()
- Network requests or API calls
- HTTP headers, request bodies, or response bodies
- Console logs or JavaScript errors
- Cookies
- Local storage or session storage
- Server-side data or database contents
Does Milana affect my app's performance?
Does Milana affect my app's performance?
Milana’s recording engine is built on rrweb, the industry-standard open-source session recording library used by PostHog, Sentry, Statsig, and others. It has been tested both in simulated environments and at scale, having recorded sessions from over 50 million browsers.Milana is designed to have minimal impact on your app. Key protections include:
- Deferred start: The SDK uses
requestIdleCallbackto wait until the browser is idle before beginning to record — delaying up to 10 seconds after initialization so that page load performance is not affected. - Buffer limits: If the event buffer grows beyond approximately 10 MB, the SDK flushes immediately. If it reaches approximately 40 MB, recording stops and the session is aborted to protect app memory and performance.
- Background flushing: Events are batched and sent every 10 seconds. Payloads are compressed with gzip on supported browsers to minimize network usage.
- Automatic retry: If the network is temporarily unavailable, the SDK retries up to 5 times with a backoff schedule (5 s, 15 s, 30 s, 60 s, 300 s) before giving up — it never blocks the main thread while retrying.
How long does it take for sessions to appear?
How long does it take for sessions to appear?
Milana waits until 30 minutes of inactivity before finalizing a session. After the session ends, it passes through a multi-stage processing pipeline:
- Ingest — raw events are received and stored
- Aggregation — events are grouped into a complete session
- Encoding — the session is rendered and encoded as a video
- AI transcription — the AI watches the video and produces a searchable description
- Indexing — the session becomes available in the dashboard and in query results