Skip to content

Latest commit

 

History

History
110 lines (97 loc) · 12.9 KB

File metadata and controls

110 lines (97 loc) · 12.9 KB

Home > @snowplow/node-tracker

node-tracker package

Enumerations

Enumeration Description
LOG_LEVEL

Functions

Function Description
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.
newTracker(trackerConfiguration, emitterConfiguration)

Interfaces

Interface Description
AdClickEvent An Ad Click Event Used to track an advertisement click
AdConversionEvent An Ad Conversion Event Used to track an advertisement click
AddToCartEvent An Add To Cart Event For tracking users adding items from a cart on an ecommerce site.
AdImpressionEvent An Ad Impression Event Used to track an advertisement impression
ConsentGrantedEvent A Consent Granted Event Used for tracking when a user grants their consent
ConsentWithdrawnEvent A Consent Withdrawn Event Used for tracking when a user withdraws their consent
ContextEvent Argument for ContextGenerator and ContextFilter callback
CoreConfiguration The configuration object for the tracker core library
CorePlugin Interface which defines Core Plugins
CorePluginConfiguration The configuration of the plugin to add
DeviceTimestamp A representation of a Device Timestamp (dtm)
EcommerceTransactionEvent An Ecommerce Transaction Event Allows for tracking common ecommerce events, this event is usually used when a customer completes a transaction.
EcommerceTransactionItemEvent An Ecommerce Transaction Item Related to the EcommerceTransactionEvent Each Ecommerce Transaction may contain one or more EcommerceTransactionItem events
Emitter Emitter is responsible for sending events to the collector. It manages the event queue and sends events in batches depending on configuration.
EmitterConfiguration
EmitterConfigurationBase
EventPayloadAndContext Interface for returning a built event (PayloadBuilder) and context (Array of SelfDescribingJson).
EventStore EventStore allows storing and retrieving events before they are sent to the collector
EventStoreConfiguration
EventStoreIterator EventStoreIterator allows iterating over all events in the store.
EventStorePayload
FormFocusOrChangeEvent Represents 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.
FormSubmissionEvent A Form Submission Event Used to track when a user submits a form
LinkClickEvent A Link Click Event Used when a user clicks on a link on a webpage, typically an anchor tag <a>
Logger
PagePingEvent 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
PageViewEvent 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).
PayloadBuilder Interface for mutable object encapsulating tracker payload
RemoveFromCartEvent An Remove To Cart Event For tracking users removing items from a cart on an ecommerce site.
RuleSet A ruleset has accept or reject properties that contain rules for matching Iglu schema URIs
ScreenViewEvent A 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
SelfDescribingEvent 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
SiteSearchEvent A Site Search Event Used when a user performs a search action on a page
SocialInteractionEvent 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.
StructuredEvent 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.
Tracker
TrackerConfiguration
TrackerCore Export interface containing all Core functions
TrueTimestamp A representation of a True Timestamp (ttm)

Variables

Variable Description
version

Type Aliases

Type Alias Description
ConditionalContextProvider Conditional context providers are two element arrays used to decide when to attach contexts, where: - the first element is some conditional criterion - the second element is any number of context primitives
ContextFilter A 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
ContextGenerator A 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
ContextPrimitive A context primitive is either a self-describing JSON or a context generator
CustomEmitter
EventBatch A collection of event payloads which are sent to the collector.
EventJson An array of tuples which represents the unprocessed JSON to be added to the Payload
EventJsonWithKeys A tuple which represents the unprocessed JSON to be added to the Payload
EventMethod
FilterProvider A filter provider is a tuple that has two parts: a context filter and the context primitive(s) If the context filter evaluates to true, the tracker will attach the context primitive(s)
FormElement A representation of an element within a form
JsonProcessor A function which will processor the Json onto the injected PayloadBuilder
NodeEmitterConfiguration
Payload Type for a Payload dictionary
RequestFailure The data that will be available to the onRequestFailure callback
RuleSetProvider A ruleset provider is aa tuple that has two parts: a ruleset and the context primitive(s) If the ruleset allows the current event schema URI, the tracker will attach the context primitive(s)
SelfDescribingJson Export interface for any Self-Describing JSON such as context or Self Describing events
Timestamp Algebraic datatype representing possible timestamp type choice