Update a website's configuration
umami_update_websiteUpdate website name, domain, public share link, and session replay or heatmap settings. Configure sampling, PII masking, recording duration, and excluded elements; omitted fields stay unchanged.
Instructions
Update a website's name, domain, public share link, or full session replay and heatmap configuration.
Covers every field Umami exposes for a website's recording setup, not just the on/off switches: sampling rates, PII masking strictness, max recording length, and a CSS selector to exclude sensitive elements (payment forms, etc.) from capture. Pass only the fields you want to change; anything omitted is left as-is. Use umami_get_recorder_config afterward to confirm exactly what the tracker will receive.
Args:
website (string, required): Website ID, name, or domain.
name (string, optional): New display name.
domain (string, optional): New domain.
share_id (string, optional): Set a custom share slug to enable a public dashboard link. Pass an empty string to disable sharing.
replay_enabled (boolean, optional): Enable or disable session replay recording.
heatmap_enabled (boolean, optional): Enable or disable heatmap data collection.
sample_rate (number, optional): Fraction of sessions to record for replay, 0 to 1.
heatmap_sample_rate (number, optional): Fraction of sessions to record for heatmaps, 0 to 1.
mask_level ('strict' | 'moderate', optional): PII masking strictness for replay recordings. 'strict' masks more aggressively.
max_duration_ms (number, optional): Maximum length of a single recording, in milliseconds. Umami's own docs are inconsistent about whether this field is ms or seconds; umami_get_recorder_config after saving shows the effective value the tracker will actually use.
block_selector (string, optional): CSS selector for elements to exclude entirely from replay capture, e.g. '.payment-form, [data-sensitive]'.
Returns: JSON shape: { "id": string, "name": string, "domain": string, "share_id": string | null, "replay_config": { "replayEnabled": boolean, "heatmapEnabled": boolean, "sampleRate": number, "heatmapSampleRate": number, "maskLevel": string, "maxDuration": number, "blockSelector": string } | null }
Examples:
"Turn on session replay for the Gradeline site at 20% sampling" -> replay_enabled=true, sample_rate=0.2
"Enable heatmaps too, sampled lighter than replay" -> heatmap_enabled=true, heatmap_sample_rate=0.1
"Mask more aggressively and exclude the payment form from recordings" -> mask_level="strict", block_selector=".payment-form"
"Give this site a public share link" -> share_id="lha-public-dashboard"
"Turn off the public link" -> share_id=""
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New display name. | |
| domain | No | New domain. | |
| website | No | Website ID (UUID), name, or domain. Optional if UMAMI_DEFAULT_WEBSITE is set. Use umami_list_websites to discover values. | |
| share_id | No | Custom share slug to enable a public dashboard link. Empty string disables sharing. | |
| mask_level | No | PII masking strictness for replay recordings. | |
| sample_rate | No | Fraction of sessions to record for replay, 0 to 1. | |
| block_selector | No | CSS selector for elements to exclude entirely from replay capture. | |
| replay_enabled | No | Enable or disable session replay recording. | |
| heatmap_enabled | No | Enable or disable heatmap data collection. | |
| max_duration_ms | No | Maximum length of a single recording, in milliseconds. | |
| heatmap_sample_rate | No | Fraction of sessions to record for heatmaps, 0 to 1. |