<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@snowplow/browser-tracker](./browser-tracker.md) &gt; [EmitterConfigurationBase](./browser-tracker.emitterconfigurationbase.md)

## EmitterConfigurationBase interface

<b>Signature:</b>

```typescript
interface EmitterConfigurationBase 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [bufferSize?](./browser-tracker.emitterconfigurationbase.buffersize.md) | number | <i>(Optional)</i> The amount of events that should be buffered before sending Recommended to leave as 1 to reduce change of losing events |
|  [connectionTimeout?](./browser-tracker.emitterconfigurationbase.connectiontimeout.md) | number | <i>(Optional)</i> How long to wait before aborting requests to the collector |
|  [cookieExtensionService?](./browser-tracker.emitterconfigurationbase.cookieextensionservice.md) | string | <i>(Optional)</i> Cookie extension service full URL. This URL will be added to the queue and will be called using a GET method. This option is there to allow the service URL to be called in order to set any required identifiers e.g. extra cookies.<!-- -->The request respects the <code>anonymousTracking</code> option, including the SP-Anonymous header if needed, and any additional custom headers from the customHeaders option. |
|  [credentials?](./browser-tracker.emitterconfigurationbase.credentials.md) | "omit" \| "same-origin" \| "include" | <i>(Optional)</i> Controls whether or not the browser sends credentials (defaults to 'include') |
|  [customFetch?](./browser-tracker.emitterconfigurationbase.customfetch.md) | (input: Request, options?: RequestInit) =&gt; Promise&lt;Response&gt; | <i>(Optional)</i> Enables overriding the default fetch function with a custom implementation. |
|  [customHeaders?](./browser-tracker.emitterconfigurationbase.customheaders.md) | Record&lt;string, string&gt; | <i>(Optional)</i> An object of key value pairs which represent headers to attach when sending a POST request, only works for POST |
|  [dontRetryStatusCodes?](./browser-tracker.emitterconfigurationbase.dontretrystatuscodes.md) | number\[\] | <i>(Optional)</i> List of HTTP response status codes for which events sent to Collector should not be retried in future request. Only non-success status codes are considered (greater or equal to 300). The don't retry codes are only considered for GET and POST requests. By default, the tracker retries on all non-success status codes except for 400, 401, 403, 410, and 422 (these don't retry codes will remain even if you set your own <code>dontRetryStatusCodes</code> but can be changed using the <code>retryStatusCodes</code>). |
|  [eventMethod?](./browser-tracker.emitterconfigurationbase.eventmethod.md) | EventMethod | <i>(Optional)</i> The preferred technique to use to send events |
|  [eventStore?](./browser-tracker.emitterconfigurationbase.eventstore.md) | EventStore | <i>(Optional)</i> Enables providing a custom EventStore implementation to store events before sending them to the collector. |
|  [idService?](./browser-tracker.emitterconfigurationbase.idservice.md) | string | <i>(Optional)</i> |
|  [keepalive?](./browser-tracker.emitterconfigurationbase.keepalive.md) | boolean | <i>(Optional)</i> Indicates that the request should be allowed to outlive the webpage that initiated it. Enables collector requests to complete even if the page is closed or navigated away from. Note: Browsers put a limit on keepalive requests of 64KB. In case of multiple keepalive requests in parallel (may happen in case of multiple trackers), the limit is shared. |
|  [maxGetBytes?](./browser-tracker.emitterconfigurationbase.maxgetbytes.md) | number | <i>(Optional)</i> The max size a GET request (its complete URL) can be. Requests over this size will be tried as a POST request. |
|  [maxPostBytes?](./browser-tracker.emitterconfigurationbase.maxpostbytes.md) | number | <i>(Optional)</i> The max size a POST request can be before the tracker will force send it Also dictates the max size of a POST request before a batch of events is split into multiple requests |
|  [onRequestFailure?](./browser-tracker.emitterconfigurationbase.onrequestfailure.md) | (data: RequestFailure, response?: Response) =&gt; void | <i>(Optional)</i> A callback function to be executed whenever a request fails to be sent to the collector. This is the inverse of the onRequestSuccess callback, so any non 2xx status code will trigger this callback. |
|  [onRequestSuccess?](./browser-tracker.emitterconfigurationbase.onrequestsuccess.md) | (data: EventBatch, response: Response) =&gt; void | <i>(Optional)</i> A callback function to be executed whenever a request is successfully sent to the collector. In practice this means any request which returns a 2xx status code will trigger this callback. |
|  [postPath?](./browser-tracker.emitterconfigurationbase.postpath.md) | string | <i>(Optional)</i> The post path which events will be sent to. Ensure your collector is configured to accept events on this post path |
|  [retryFailedRequests?](./browser-tracker.emitterconfigurationbase.retryfailedrequests.md) | boolean | <i>(Optional)</i> Whether to retry failed requests to the collector.<!-- -->Failed requests are requests that failed due to \[timeouts\](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/timeout\_event), \[network errors\](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/error\_event), and \[abort events\](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/abort\_event).<!-- -->Takes precedent over <code>retryStatusCodes</code> and <code>dontRetryStatusCodes</code>. |
|  [retryStatusCodes?](./browser-tracker.emitterconfigurationbase.retrystatuscodes.md) | number\[\] | <i>(Optional)</i> List of HTTP response status codes for which events sent to Collector should be retried in future requests. Only non-success status codes are considered (greater or equal to 300). The retry codes are only considered for GET and POST requests. They take priority over the <code>dontRetryStatusCodes</code> option. By default, the tracker retries on all non-success status codes except for 400, 401, 403, 410, and 422. |
|  [useStm?](./browser-tracker.emitterconfigurationbase.usestm.md) | boolean | <i>(Optional)</i> Should the Sent Timestamp be attached to events. Only applies for GET events. |

