Getting started with jam.js

Install jam.js to get console and network logs in every customer support ticket.

Here’s a preview of what you’ll get with every support ticket:

How to set up jam.js?

Installing Jam.js takes under 5 min guaranteed, and if it takes you a second longer, we'll buy you a pizza. 🍕

1. Go to jam.dev and select the team where you want your Jams from Intercom to appear.

2. Copy the team ID from the URL

3. Add the team ID to this code snippet

<script async defer src="https://js.jam.dev/support/<team ID here>.js"></script>

4. Paste the snippet into your web app's codebase

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:

<html>
	<head>
		<!-- PASTE JAM.JS SCRIPT TAG HERE -->
	</head>
	<body>
		<div id="root"></div>
		<script src="/app.js"></script>
	</body>
</html>

Because we include the async and defer tags within the script snippet, fetching the jam.js script will not impact page load times.

How to test jam.js?

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:

console.log('test'); // this creates a console log
fetch('/test'); // this creates a network request

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!

Current limitations

  • 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.

Last updated