Menu
Grafana Cloud

Exclude endpoints from tracking

By default the performance instrumentation captures all resource entries, even those sent to third parties like other analytics platforms and so on.

Most often it is not necessary to track resource loads from those endpoints. To save the amount of data and requests sent by Faro it is advisable to exclude them.

Faro provides the ignoreUrls property where to define URLs to excluded from being tracked by the performance instrumentation. Exclude URLs can either be defined as full URL strings or regular expression patterns.

ts
initializeFaro({
  url: 'https://my-domain.my-tld/collect/{app-key}',
  app: {
    name: 'my-app',
  },

  ignoreUrls: [/.*.analytics.vendor.com.*/, 'https://other-analytics.com/foo'],

  // To only instrument the URL for the current domain
  // ignoreUrls: [new RegExp(`^(?!.*${window.location.hostname})`)],
});