Class: Tracker

Tracker


new Tracker()

The Tracker is used to make tracking calls to Invidi when your video player
fires certain events.

Members


<static> AdError :string

Ad errors. Passed to videoplaza.tracking.Tracker.reportError and videoplaza.adrequest.AdRequester.requestPassback
to describe an error that has occurred.

Type:
  • string
Properties:
Name Type Default Description
TYPE_NOT_SUPPORTED string adTypeNotSupportedError

Indicates that an unsupported ad type was received

NO_AD string noAdError

Indicates that an ad response without an ad, or an inventory response, was received

GENERAL_ERROR string generalAdError

Indicates that an unspecified error occured with the ad or ad request


<static> AdEventType :string

Ad-level tracking events; passed to videoplaza.tracking.Tracker.trackEvent when tracking Ad events.

Type:
  • string
Properties:
Name Type Default Description
IMPRESSION string impression

Impression


<static> CreativeError :string

Creative errors. Passed to videoplaza.tracking.Tracker.reportError and videoplaza.adrequest.AdRequester.requestPassback
to describe an error that has occurred.

Type:
  • string
Properties:
Name Type Default Description
MEDIA_FILE_NOT_FOUND string mediaFileNotFoundError

Indicates that a request for the given media file or resource file resulted in a 404 response

MEDIA_FILE_TIMEOUT string mediaFileTimeoutError

Indicates that a request for the given media file or resource timed out before completing

NO_SUPPORTED_MEDIA_FILE_FOUND string noSupportedMediaFileFoundError

Indicates that no media file or resource supported by the player could be found

MEDIA_FILE_DISPLAY_ERROR string mediaFileDisplayError

Indicates that the media file loaded could not be displayed


<static> CreativeEventType :string

Creative-level tracking events; passed to videoplaza.tracking.Tracker.trackEvent when tracking LinearCreative or NonLinearCreative events.

Type:
  • string
Properties:
Name Type Default Description
CREATIVE_VIEW string creativeview
START string start

Indicates that a creative has begun playing

FIRST_QUARTILE string firstquartile

Indicates that a creative has played for at least 25% of its duration

MIDPOINT string midpoint

Indicates that a creative has played for at least 50% of its duration

THIRD_QUARTILE string thirdquartile

Indicates that a creative has played for at least 75% of its duration

COMPLETE string complete

Indicates that a creative has played until completion

PROGRESS string progress

Indicates that a creative has played for a certain duration of time, determined by the trackingParameter argument to trackEvent()

CLICKTHROUGH string clickthrough

Indicates that the user clicked a creative and loaded its associated landing page

MUTE string mute

Indicates that the user muted a creative

UNMUTE string unmute

Indicates that the user unmuted a creative

PAUSE string pause

Indicates that the user paused a creative

REWIND string rewind

Indicates that the user paused playback of a creative

RESUME string resume

Indicates that the user resumed playback of a creative after having previously paused or stopped it

FULLSCREEN string fullscreen

Indicates that the user entered fullscreen mode for a creative

EXIT_FULLSCREEN string exitfullscreen

Indicates that the user exited fullscreen mode for a creative

EXPAND string expand

Indicates that the user expanded a creative

COLLAPSE string collapse

Indicates that the user collapsed an expanded creative

ACCEPT_INVITATION string acceptinvitation

Indicates that the user chose one ad out of several, or chose to move to an additional portion of a creative

CLOSE string close

Indicates that the user closed the video player or player page

SKIP string skip

Indicates that the user chose to skip a creative


<static> SessionEventType :string

Session-level tracking events; passed to videoplaza.tracking.Tracker.trackEvent when tracking Session events.

Type:
  • string
Properties:
Name Type Default Description
CONTENT_START string contentStart

Indicates that the video content has started playback.

Methods


addLogListener(logCallback)

Register a callback function to log tracker events.

Parameters:
Name Type Description
logCallback videoplaza.LogItem~logItemCallback

A callback which will receive logging information.


trackEvent(trackable, event, trackingParameter)

Track event for a trackable object.

Parameters:
Name Type Description
trackable videoplaza.adresponse.Ad | videoplaza.adresponse.LinearCreative | videoplaza.adresponse.NonLinearCreative

The trackable object to which the event to be tracked relates.

event videoplaza.tracking.Tracker.SessionEventType | videoplaza.tracking.Tracker.AdEventType | videoplaza.tracking.Tracker.CreativeEventType | string

The event to be tracked. Either one of the predefined standard events, or a custom tracking event defined in Pulse.

trackingParameter string

Specifies which variation of certain events is to be tracked; currently represents the 'offset' parameter when tracking videoplaza.tracking.Tracker.CreativeEventType.PROGRESS.


trackProgress(progressAmount, creative)

Track that ad playback has progressed to a given point.

Parameters:
Name Type Description
progressAmount number

The progress, specified in seconds.

creative videoplaza.adresponse.LinearCreative

The linear creative for which to track progress.


trackTimeSpent(timeSpentInSeconds, creative)

Track the time in seconds that a user spent watching a creative.

Parameters:
Name Type Description
timeSpentInSeconds number

The time, specified in seconds.

creative videoplaza.adresponse.LinearCreative | videoplaza.adresponse.NonLinearCreative

The creative for which to track the time spent.