Documentation Index
Fetch the complete documentation index at: https://docs.getmilana.ai/llms.txt
Use this file to discover all available pages before exploring further.
Get your Product ID and Client Key
Open your Milana Settings page.Copy your Product ID (starts with
prd_) and your Client Key (starts with key_).Add the SDK snippet
Add the following to the The first
<head> of every page you want to record. Replace YOUR_PRODUCT_ID and YOUR_CLIENT_KEY with your values.<script> block creates a queue function. You can call Milana(...) immediately — commands are buffered and replayed once the SDK loads.If your site sends a
Content-Security-Policy header, allow https://cdn.getmilana.ai in script-src so the SDK can load and https://in.getmilana.ai in connect-src so it can send events. The queue snippet above is an inline <script>, so script-src must also include 'unsafe-inline' or a nonce.Initialize recording
Call
Milana("init", ...) when you want to start recording:Your Client Key is a public identifier meant to be included in client-side code. It does not grant access to your data.
Identify users
When user information is available, call You can also update session-level metadata at any time:
Milana("identify", ...) to attach their identity to the session:Verify in the dashboard
Open the Integration page. Within a few seconds of loading a page with the SDK, a new session should appear under Latest Sessions.If you don’t see sessions after a minute:
- Open the browser console and look for
Milana:log messages - Confirm you see
Milana: Readyin the console - Check that your Product ID starts with
prd_and your Client Key starts withkey_ - See the Troubleshooting guide for more help
Full page example
Available commands
All commands use theMilana("command", ...) queue syntax:
Debug mode
Debug mode is controlled fromlocalStorage. Run this in your browser console and reload the page:
Milana [debug]: ... messages. To disable:
What’s next
Track custom events
Mark important actions so the AI can surface them in query results.
Privacy controls
Block, mask, or ignore sensitive elements in recordings.