<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@snowplow/browser-tracker](./browser-tracker.md) &gt; [newTracker](./browser-tracker.newtracker.md)

## newTracker() function

Initialise a new tracker

<b>Signature:</b>

```typescript
declare function newTracker(trackerId: string, endpoint: string, configuration?: TrackerConfiguration): BrowserTracker | null | undefined;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  trackerId | string | The tracker id - also known as tracker namespace |
|  endpoint | string | Collector endpoint in the form collector.mysite.com |
|  configuration | TrackerConfiguration | The initialisation options of the tracker |

<b>Returns:</b>

BrowserTracker \| null \| undefined

