Skip to main content

browser-tracker.newtracker

Home > @snowplow/browser-tracker > newTracker

newTracker() function

Initialise a new tracker

Signature:
declare function newTracker(trackerId: string, endpoint: string, configuration?: TrackerConfiguration): BrowserTracker | null | undefined;

Parameters

ParameterTypeDescription
trackerIdstringThe tracker id - also known as tracker namespace
endpointstringCollector endpoint in the form collector.mysite.com
configurationTrackerConfigurationThe initialisation options of the tracker
Returns:

BrowserTracker | null | undefined