Quick Start - Web

Web Quick Start

Get session recording working on your website in under 5 minutes.

Prerequisites

  • A website or web app (HTML, React, Angular, Vue, Next.js, etc.)
  • A UXCam account with an app key

Step 1: Add the SDK Snippet

Copy this script and include it in your HTML before the closing </head> tag. Replace 'YOUR_APP_KEY' with your key from the UXCam dashboard:

<script type="text/javascript" defer="">
(function(appKey, opts) {
    window.uxc = {
        __t: [],
        __ak: appKey,
        __o: opts,
        event: function(n, p) {
            this.__t.push(['event', n, p]);
        },
        setUserIdentity: function(i) {
            this.__t.push(['setUserIdentity', i]);
        },
        setUserProperty: function(k, v) {
            this.__t.push(['setUserProperty', k, v]);
        },
        setUserProperties: function(p) {
            this.__t.push(['setUserProperties', p]);
        },
    };
    var head = document.getElementsByTagName('head')[0];
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = '//websdk-recording.uxcam.com/index.js';
    script.async = true;
    script.defer = true;
    script.id = 'uxcam-web-sdk';
    script.crossOrigin = 'anonymous';
    head.appendChild(script);
})('YOUR_APP_KEY', {});
</script>
📘

Include this snippet in all your HTML pages to record your entire website. SPAs (single-page apps) are supported automatically.


Step 2: Verify It Works

  1. Deploy or serve your site locally
  2. Check for the [UXCam] connected successfully message in the browser console
  3. Browse a few pages for at least 30 seconds
  4. Check your UXCam Dashboard — your session should appear after 5 - 10 minutes

What's Captured Automatically

Once the snippet is live, UXCam captures these out of the box — no extra code needed:

  • User interactions — clicks, scrolls, page navigations
  • Page visits — all page views
  • Sensitive data protection — password, email, tel, and credit card inputs are auto-occluded
  • User identification — anonymous browser/device IDs

Next Steps

You're recording sessions! Now customize your integration:


What's Next? ...