- React
- JavaScript
- Script Tag
Wrap your app with
MilanaProvider to initialize recording automatically on mount:With options
Deferred initialization
To gate Milana behind a feature flag, use deferred initialization. See the Feature-flagged Rollout guide for a complete walkthrough.Parameters
string
required
Your Milana client key. Must start with
key_. Find it on your Settings page alongside your product ID.object
required
Session-level information sent with every recording.
object
Optional configuration. All fields are optional.
boolean
default:"false"
React only. Skip auto-initialization on mount. Call
initialize() from useMilana() later to trigger initialization manually.Return value
boolean
true if the session started and was included in the current sampling rate. false if the session was not sampled, the credentials were invalid, or a network error occurred. Your application is not affected either way — a false result simply means no data will be recorded for this session.