Skip to main content

browser-tracker.setcollectorurl

Home > @snowplow/browser-tracker > setCollectorUrl

setCollectorUrl() function

Specify the Snowplow collector URL. Specific http or https to force it or leave it off to match the website protocol.

Signature:
declare function setCollectorUrl(collectorUrl: string, trackers?: Array<string>): void;

Parameters

ParameterTypeDescription
collectorUrlstringThe collector URL, with or without protocol
trackersArray<string>The tracker identifiers which will be configured
Returns:

void