Setting up Recording Links with console logs, network requests

Send a link to auto-capture console logs, network requests and more. Just connect your website to Jam. Here's how.

You'll need write permissions to your website to complete these three steps:

  1. Register one or more Recording URLs with Jam (so we can generate links to your site)

  2. Set up Jam's Recorder & Capture Scripts on your site (so your users can start recording & capturing page context)

  3. Modify your Content-Security-Policy if necessary (so Jam assets can execute on your page)

1. Register one or more Recording URLs

Hosted Recording Links bring users directly to your pages. You may show them content before and after the recording begins. Each base Recording URL must be registered before use.

Navigate to your Jam team's settings page, and click the "Recording Links" tab.

Under Recording URLs: add, install, and verify the installation of one or more valid URLs. These will later be available to select when creating a Recording Link.

2. Set up Jam's Recorder & Capture Scripts

To properly associate your users' recordings with the logs we collect, Jam's Recorder and Capture scripts need to be served under the same origin [MDN] as your site or application.

Use Jam.js' Recorder and Capture scripts to initialize a recorder on your page and associate captured events.

<html>
  <head>
    <!-- Lets users record their screen from your site -->
    <meta name="jam:team" content="my-team-id-from-dashboard" />
    <script type="module" src="https://js.jam.dev/recorder.js"></script>

    <!-- Captures user events and developer logs -->
    <script type="module" src="https://js.jam.dev/capture.js"></script>
  </head>
</html>

The Recorder script will cause our Recorder UX to pop up over your page when users open your Recording Links. If the user dismisses the Recorder UX before starting a recording, they must re-click your Recording Link to try again.

The Capture script will capture events—such as console logs, network events, clicks, and keypresses—on your pages when recordings are in progress. These will be associated and saved with your users' recordings, and otherwise ignored.

Once the recording is complete, Jam will confirm that the user would like to discard their recording if they try to close the Recorder UX before the Jam has been submitted.

Once the Jam has been submitted, the Recorder UX will close automatically, restoring control to your page.

We aggressively cache Jam.js assets to minimize load time—especially the Capture script!—prioritizing only critical code and deferring the rest to ensure your page continues to load and run rapidly.

3. Modify your Content-Security-Policy

(If your site does not specify CSP directives, you can skip this step.)

Some sites specify Content-Security-Policy [MDN] directives via either a header or meta tag. A frame-src or script-src directive that doesn't include *.jam.dev will block Jam.js from including console logs with your user's Jams.

To fix this, modify your CSP header or meta tag to allow *.jam.dev as both. For example:

<meta
  http-equiv="Content-Security-Policy"
  content="frame-src 'self' *.jam.dev; script-src 'self' *.jam.dev;"
/>

Verify logs are captured

Congratulations! You should now be able to capture logs on your domain. To verify your install is working correctly, simply click the Verify link in your Recording URL settings:

This will open your Recording URL to a special "verify" UI. If you see this, it means you've successfully installed the Recorder script. If you have a tab open with the Capture tab successfully installed on it, the test will succeed; otherwise you'll have to open a tab to such a page or revisit that installation step.

If your code calls window.jam.recorder.open(...) manually, simply provide "verify" as the recordingId.

FAQs

  • Q: Can I put the Recorder and Capture scripts on different pages? A: Yes! There is no danger in doing so. If you do, the <meta name="jam:team" ...> element must be included on pages with the recorder script, and may be omitted from ones with only the capture script.

  • Q: Can I programmatically create Recording Links directly on my page? A: Not at this time; an upcoming release will expose an API you can use to create Recording Links from anywhere—Slack, Zendesk, or directly on your site (or app).

  • Q: Can I customize the Recorder UI? A: Not at this time—but we'd like to make this more customizable. Please let us know what you'd like to do!

  • Q: Can I associate Jam data with recordings we manage? A: No; due to browser storage + message partitioning controls, Jam's Recording Links scripts only work when used together.

Current limitations

  • Log capture is fully-supported in Chrome (including Incognito Windows) and Firefox (including Private Windows), and supported in most Safari windows. Log capture from Safari Private Windows is not currently supported.

  • If the Capture script is installed within an iframe, the top level logs will not get captured, e.g. capturing logs in embedded Shopify apps.

  • When using the async and defer script attributes or lazy-loaded import(...) calls with Jam's Capture script, we cannot guarantee it will run early enough to capture every console log, network request, or other capturable event.

Last updated

Was this helpful?