Install session replay on any website
Paste the snippet before the closing </head>tag, on every page you want recorded:
<script>
window.logcohort||(function(w,d){
var o=w.logcohort=function(){o.api.push(arguments)};o.api=[];o._v='1';
o._w={fetch:w.fetch};
w.fetch&&(w.fetch=function(){return o._w.fetch.apply(this,arguments)});
var c=d.createElement('script');c.async=true;c.type='text/javascript';
c.src='https://app.logcohort.com/recorder.js';
c.onerror=function(){w.console&&w.console.warn&&w.console.warn('[logcohort] recorder failed to load from '+c.src)};
d.getElementsByTagName('head')[0].appendChild(c);
})(window,document);
logcohort('init','lc_YOUR_PROJECT_KEY');
</script>Your project key replaces lc_YOUR_PROJECT_KEY — the dashboard (Project → Install) generates this block with the key already filled in. The snippet defines a tiny command queue (window.logcohort) and loads the recorder asynchronously — it never blocks your page.
Verify
Publish, visit your site, click around for a few seconds, then open the logcohort dashboard — the session appears within seconds.
A leaked key can't record from elsewhere: ingest checks your project's origin allowlist, so the snippet only works on domains you've approved.
Next: identify signed-in users.