Skip to main content

node-tracker

Home > @snowplow/node-tracker

node-tracker package

Enumerations

EnumerationDescription
HttpMethod
HttpProtocol

Functions

FunctionDescription
buildAdClick(event)Build a Ad Click Event Used to track an advertisement click
buildAdConversion(event)Build a Ad Conversion Event Used to track an advertisement click
buildAddToCart(event)Build a Add To Cart Event For tracking users adding items from a cart on an ecommerce site.
buildAdImpression(event)Build a Ad Impression Event Used to track an advertisement impression
buildConsentGranted(event)Build a Consent Granted Event Used for tracking when a user grants their consent
buildConsentWithdrawn(event)Build a Consent Withdrawn Event Used for tracking when a user withdraws their consent
buildEcommerceTransaction(event)Build an Ecommerce Transaction Event Allows for tracking common ecommerce events, this event is usually used when a consumer completes a transaction.
buildEcommerceTransactionItem(event)Build an Ecommerce Transaction Item Event Related to the buildEcommerceTransaction() Each Ecommerce Transaction may contain one or more EcommerceTransactionItem events
buildFormFocusOrChange(event)Build a Form Focus or Change Form Event based on schema property When a user focuses on a form element or when a user makes a change to a form element.
buildFormSubmission(event)Build a Form Submission Event Used to track when a user submits a form
buildLinkClick(event)Build a Link Click Event Used when a user clicks on a link on a webpage, typically an anchor tag <a>
buildPagePing(event)Build a Page Ping Event Fires when activity tracking is enabled in the browser. Tracks same information as the last tracked Page View and includes scroll information from the current page view
buildPageView(event)Build a Page View Event Represents a Page View, which is typically fired as soon as possible when a web page is loaded within the users browser. Often also fired on "virtual page views" within Single Page Applications (SPA).
buildRemoveFromCart(event)Build a Remove From Cart Event For tracking users removing items from a cart on an ecommerce site.
buildScreenView(event)Build a Scren View Event Similar to a Page View but less focused on typical web properties Often used for mobile applications as the user is presented with new views as they performance navigation events
buildSelfDescribingEvent(event)Build a self-describing event 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
buildSiteSearch(event)Build a Site Search Event Used when a user performs a search action on a page
buildSocialInteraction(event)Build a Social Interaction Event Social tracking will be used to track the way users interact with Facebook, Twitter and Google + widgets e.g. to capture “like this” or “tweet this” events.
buildStructEvent(event)Build 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.
gotEmitter(endpoint, protocol, port, method, bufferSize, retry, cookieJar, callback, agents)Create an emitter object, which uses the got library, that will send events to a collector
tracker(emitters, namespace, appId, encodeBase64)Snowplow Node.js Tracker

Interfaces

InterfaceDescription
AdClickEventAn Ad Click Event Used to track an advertisement click
AdConversionEventAn Ad Conversion Event Used to track an advertisement click
AddToCartEventAn Add To Cart Event For tracking users adding items from a cart on an ecommerce site.
AdImpressionEventAn Ad Impression Event Used to track an advertisement impression
ConsentGrantedEventA Consent Granted Event Used for tracking when a user grants their consent
ConsentWithdrawnEventA Consent Withdrawn Event Used for tracking when a user withdraws their consent
ContextEventArgument for ContextGenerator and ContextFilter callback
CoreConfigurationThe configuration object for the tracker core library
CorePluginInterface which defines Core Plugins
EcommerceTransactionEventAn Ecommerce Transaction Event Allows for tracking common ecommerce events, this event is usually used when a customer completes a transaction.
EcommerceTransactionItemEventAn Ecommerce Transaction Item Related to the EcommerceTransactionEvent Each Ecommerce Transaction may contain one or more EcommerceTransactionItem events
Emitter
FormFocusOrChangeEventRepresents either a Form Focus or Form Change event When a user focuses on a form element or when a user makes a change to a form element.
FormSubmissionEventA Form Submission Event Used to track when a user submits a form
LinkClickEventA Link Click Event Used when a user clicks on a link on a webpage, typically an anchor tag <a>
PagePingEventA Page Ping Event Fires when activity tracking is enabled in the browser. Tracks same information as the last tracked Page View and includes scroll information from the current page view
PageViewEventA Page View Event Represents a Page View, which is typically fired as soon as possible when a web page is loaded within the users browser. Often also fired on "virtual page views" within Single Page Applications (SPA).
PayloadBuilderInterface for mutable object encapsulating tracker payload
RemoveFromCartEventAn Remove To Cart Event For tracking users removing items from a cart on an ecommerce site.
ScreenViewEventA Screen View Event Similar to a Page View but less focused on typical web properties Often used for mobile applications as the user is presented with new views as they performance navigation events
SelfDescribingEventA Self Describing Event 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
SiteSearchEventA Site Search Event Used when a user performs a search action on a page
SocialInteractionEventA Social Interaction Event Social tracking will be used to track the way users interact with Facebook, Twitter and Google + widgets e.g. to capture “like this” or “tweet this” events.
StructuredEventA 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.
Tracker

Variables

VariableDescription
version

Type Aliases

Type AliasDescription
ContextFilterA context filter is a user-supplied callback that is evaluated for each event to determine if the context associated with the filter should be attached to the event
ContextGeneratorA context generator is a user-supplied callback that is evaluated for each event to allow an additional context to be dynamically attached to the event
PayloadType for a Payload dictionary
SelfDescribingJsonExport interface for any Self-Describing JSON such as context or Self Describing events
TimestampAlgebraic datatype representing possible timestamp type choice