This example shows how to configure TrackJS for a passive tracking environment, such as a third-party plugin or chrome module. In this case, you do not want to track everything on the page, as most events are not relevant to you. You only want to track events that you directly send into TrackJS.
This disables all automatic tracking and collection of Telemetry events.
To record your own Telemetry events, use the TrackJS console:
And to catch errors from your code, you’ll want to use the helper functions attempt and watch, or surround your code in try/catch blocks.
Use attempt if your code is synchronous and contained in a single function.
Use watch to wrap individual functions that you might use in a callback.
Or use your own trycatch wrapping and forward the errors to TrackJS.