Getting started with jam.js
Install jam.js to get console and network logs in every customer support ticket.
Last updated
Install jam.js to get console and network logs in every customer support ticket.
Last updated
Here’s a preview of what you’ll get with every support ticket:
Installing Jam.js takes under 5 min guaranteed, and if it takes you a second longer, we'll buy you a pizza. 🍕
In order to guarantee jam.js can properly capture console and network requests, it should be the first <script>
tag on the page.
For example, here’s where the jam.js script would go in an example template HTML file for a Single Page App:
Because we include the async
and defer
tags within the script snippet, fetching the jam.js script will not impact page load times.
Some sites specify Content-Security-Policy directives via either a header or meta tag.
(If your site does not specify CSP directives, you can skip this step.)
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 a frame-src
and script-src
.
Once jam.js is installed, every Jam your users create will have console logs and network requests attached.
To test this out, issue a screen recording request, and begin recording your web app.
Open devtools for your web app, and run the following test commands in console:
Now, you should have console and network events generated and captured for your recorded Jam.
To confirm, submit the Jam, then open its link and click on the Console and Network tabs. Your Jam should include at least 1 console and network event, each.
Here’s how this might look:
Coming soon: user actions and page navigation events - stay tuned!
If jam.js is installed within an iframe, the top level logs will not get captured, e.g. using jam.js on embedded Shopify apps.
Console and network event capture is currently unavailable for Jams created in Firefox, Safari, or incognito mode. We plan to add support for these browsers in October.
Because we include the async
and defer
tags, the first page load (or any page load, when cache is disabled) will not guarantee jam.js runs early enough to capture console and network requests. This is a tradeoff we’ve made to make sure we do not impact your app’s load times.