If you include user information in your TrackJS configuration, you may need to wait for user consent before tracking errors. To do this, you’ll install the agent normally, but intercept and store errors with the onError callback until you receive user consent. You can adapt the following code sample into your application.
NOTE By default, the TrackJS agent does not capture any user-identifiable information. Waiting for user consent is not required with an anonymous installation.