| addGlobalContexts(contexts, trackers) |
All provided contexts will be sent with every event |
| addPlugin(configuration, trackers) |
Add a plugin into the plugin collection after trackers have already been initialised |
| clearGlobalContexts(trackers) |
Clear all global contexts that are sent with events |
| clearUserData(configuration, trackers) |
Clears all cookies and local storage containing user and session identifiers |
| crossDomainLinker(crossDomainLinkerCriterion, trackers) |
Enable querystring decoration for links pasing a filter |
| disableActivityTracking(trackers) |
Disables page activity tracking. |
| disableActivityTrackingCallback(trackers) |
Disables page activity tracking callback. |
| disableAnonymousTracking(configuration, trackers) |
Disables anonymous tracking if active (ie. tracker initialized with anonymousTracking) For stateStorageStrategy override, uses supplied value first, falls back to one defined in initial config, otherwise uses cookieAndLocalStorage. |
| discardBrace(enable, trackers) |
Strip braces from URL |
| discardHashTag(enable, trackers) |
Strip hash tag (or anchor) from URL |
| enableActivityTracking(configuration, trackers) |
Enables page activity tracking (sends page pings to the Collector regularly). |
| enableActivityTrackingCallback(configuration, trackers) |
Enables page activity tracking (replaces collector ping with callback). |
| enableAnonymousTracking(configuration, trackers) |
Enables anonymous tracking (ie. tracker initialized without anonymousTracking) |
| flushBuffer(configuration, trackers) |
Send all events in the outQueue Only need to use this when sending events with a bufferSize of at least 2 |
| newSession(trackers) |
Expires current session and starts a new session. |
| newTracker(trackerId, endpoint) |
Initialise a new tracker |
| newTracker(trackerId, endpoint, configuration) |
Initialise a new tracker |
| preservePageViewId(trackers) |
Stop regenerating pageViewId (available from web_page context) |
| removeGlobalContexts(contexts, trackers) |
All provided contexts will no longer be sent with every event |
| setBufferSize(newBufferSize, trackers) |
Set the buffer size Can be useful if you want to stop batching requests to ensure events start sending closer to event creation |
| setCollectorUrl(collectorUrl, trackers) |
Specify the Snowplow collector URL. Specific http or https to force it or leave it off to match the website protocol. |
| setCookiePath(path, trackers) |
Set first-party cookie path |
| setCustomUrl(url, trackers) |
Override url |
| setDocumentTitle(title, trackers) |
Override document.title |
| setOptOutCookie(name, trackers) |
Sets the opt out cookie. |
| setReferrerUrl(url, trackers) |
Override referrer |
| setUserId(userId, trackers) |
Set the business-defined user ID for this user. |
| setUserIdFromCookie(cookieName, trackers) |
Set the business-defined user ID for this user to the value of a cookie. |
| setUserIdFromLocation(querystringField, trackers) |
Set the business-defined user ID for this user using the location querystring. |
| setUserIdFromReferrer(querystringField, trackers) |
Set the business-defined user ID for this user using the referrer querystring. |
| setVisitorCookieTimeout(timeout, trackers) |
Set visitor cookie timeout (in seconds) |
| trackPageView(event, trackers) |
Track a visit to a web page |
| trackSelfDescribingEvent(event, trackers) |
Track a self-describing event happening on this page. A custom event type, allowing for an event to be tracked using your own custom schema and a data object which conforms to the supplied schema |
| trackStructEvent(event, trackers) |
Track a structured event A classic style of event tracking, allows for easier movement between analytics systems. A loosely typed event, creating a Self Describing event is preferred, but useful for interoperability. |
| updatePageActivity(trackers) |
Triggers the activityHandler manually to allow external user defined activity. i.e. While watching a video |