Solution skill
RUM and Session Replay: SDK init, sample rates, CSP, clean-profile test
Complete solution
Shows how to fix rUM and Session Replay: SDK init, sample rates, CSP, clean-profile test. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Install the browser SDK (npm into your frontend bundle is the recommended path). In the Datadog app: Digital Experience, add application, JavaScript type.
Steps
- In the Datadog app: Digital Experience, add application, JavaScript type. Copy the
clientTokenandapplicationId. - Install the browser SDK (npm into your frontend bundle is the recommended path).
Init early in the page lifecycle:
applicationIdandclientTokenfrom step 1.sitematching your org region (same trap as everything else).serviceandenvmatching your backend unified tagging so frontend and backend sessions join.sessionSampleRate: 100 while validating, then lower for production volume.- Session Replay: enable it and set its sample rate separately; replay is the expensive one, sample it harder than sessions.
- Privacy: default text masking is on for a reason. Decide what unmasking you actually need before turning it off.
- - CSP: add the SDK script and intake domains to your Content Security Policy, or the SDK silently never loads.
- Ad blockers: test in a clean browser profile. Blockers nuke the SDK and your testing will false-negative.
- Consent gates: if the SDK loads after consent, undocumented users produce no sessions. That is a product decision, make it deliberately.
When to use
You are seeing this: Copy the clientToken and applicationId. Use this skill when you run into "RUM and Session Replay: SDK init, sample rates, CSP, clean-profile test".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
The RUM browser setup docs: create the application under Digital Experience to get the clientToken and applicationId, then install the browser SDK (npm recommended). Sample rates and privacy settings are init options. Verified against live docs 2026-09-26.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_QVuCxd1OLMYkOHoC5lSYZA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">RUM and Session Replay: SDK init, sample rates, CSP, clean-profile test <span>— Vectle</span></a>