EdgeKitTrackerOptions
EdgeKitTrackerOptions =
object
Properties
Section titled “Properties”anonymousTracking?
Section titled “anonymousTracking?”
optionalanonymousTracking?:boolean
Snowplow’s cookie-free mode. Off by default. Useful before consent when
your organization’s consent basis is consent_required.
collectorOrigin?
Section titled “collectorOrigin?”
optionalcollectorOrigin?:string
Origin to send events to. Defaults to the page’s own origin, where the collector is mounted under EdgeKitTrackerOptions.pathPrefix. Same origin means no CORS preflight and no Content Security Policy change.
pathPrefix?
Section titled “pathPrefix?”
optionalpathPrefix?:string
Path the collector is mounted under. Defaults to /edgekit. Events are
posted to {pathPrefix}/a/t.
plugins?
Section titled “plugins?”
optionalplugins?:BrowserPlugin[]
Snowplow browser plugins. Install each @snowplow/browser-plugin-*
package yourself, at the version matching this package’s
@snowplow/browser-tracker. Pass the plugins here (for example
[FormTrackingPlugin()]), then switch each one on with its own enable*
function, passing EdgeKitTracker.name.
requireConsent?
Section titled “requireConsent?”
optionalrequireConsent?:boolean
When true, every track* call is held in memory until
EdgeKitTracker.grantConsent is called. Held events are lost if the
page unloads first. Set it from your consent management platform (CMP).
Consent is enforced only here, in the browser. The collector does not check it.
siteId
Section titled “siteId”siteId:
string
The site’s id in EdgeKit, sent as Snowplow’s appId. Every event is filed
under this id exactly as sent. The collector never refuses an event for an
unknown id, so a typo here is not reported back to the page.
trackerConfiguration?
Section titled “trackerConfiguration?”
optionaltrackerConfiguration?:Partial<TrackerConfiguration>
Any Snowplow TrackerConfiguration option. Applied last, so it overrides
the defaults createTracker sets, postPath included.
Leave retryStatusCodes and dontRetryStatusCodes at Snowplow’s
defaults: the collector answers 400, 401, 403, 410 or 422 only
when retrying cannot succeed, and relies on everything else being retried.