You can do this with either a client-side or server-side Ignore Rule. The server side is a bit easier to get started, but it's a little limited today. You can only build "exclude" rules, which means you'd have to add a rule for each third-party you'd like to ignore.
For example, if you wanted to ignore errors from example.com, you would do this:

We are currently working on some new capabilities for Ignore that will allow you to build "include only" style rules, but that is a little ways out yet.
Maybe a better option would be to write an onError
callback, where you can add your own logic. You could check the error payload to see if it is from something other than what you expect, and only send that. For example:
TrackJS.install({
token: 'your token',
/* other options */
onError: function(payload) {
// some errors don't have a stack, so we only want to exclude the ones
// that do, but are not from our code
if (payload.stack && payload.stack.indexOf('mydomain.com') < 0) {
return false;
}
return true;
}
});
** I'm a developer at TrackJS