TrackJS

Gain better error insights in TrackJS with Zipy session URLs

Integration Steps:

Step 1: Install TrackJS

Ensure that TrackJS is properly installed and initialized within your application. This typically involves adding the TrackJS JavaScript snippet to your project's HTML file(s). Make sure to replace <YOUR_TRACKJS_TOKEN> with your actual TrackJS token.

window.TrackJS && TrackJS.install({ 
    token: "<YOUR_TRACKJS_TOKEN>"
});

Step 2: Retrieve the Zipy Session URL

To include the Zipy session URL in TrackJS exception reports, you need to fetch the current Zipy session URL using the getCurrentSessionURL() function provided by the Zipy SDK. Assign the retrieved URL to the zipySessionUrl variable.

const zipySessionUrl = window.zipy.getCurrentSessionURL();

Step 3: Add Zipy Session URL as TrackJS Metadata

In order to include the Zipy session URL in the TrackJS exception reports, you can leverage TrackJS's metadata feature. Use the addMetadata() function provided by TrackJS to associate the Zipy session URL with the "zipy_session_url" key.

TrackJS.addMetadata("zipy_session_url", zipySessionUrl);

Step 4: Verify Zipy Session URL in TrackJS Metadata

When viewing a specific exception report in TrackJS, navigate to the "Metadata" section. Here, you should find the "zipy_session_url" key along with its corresponding value, which represents the Zipy session URL.

Last updated