Class Tracker

com.yandex.mobile.ads.video.tracking

public class Tracker

The class is used for tracking events triggered by an object of the VideoAd or Creative class.

The event types are described in the Events class.

Nested Classes

Constructors

Tracker()

Creates a new object of the Tracker class.

Tracker(@NonNull final Context context)

Creates a new object of the Tracker class.

Methods

void setErrorListener(final ErrorListener errorListener)

Specifies an object of the ErrorListener class to receive error notifications.

void trackAdEvent(final VideoAd ad, final String eventName)

Tracks an advertising event for an object of the VideoAd class.

void trackCreativeEvent(final Creative creative, final String eventName)

Tracks an advertising event for an object of the Creative class.

Constructor Detail

Tracker

public Tracker ()

Creates a new object of the Tracker class.

Note.

This method is deprecated. Use the #Tracker(Context) method.

Tracker

public Tracker (@NonNull final Context context)

Creates a new object of the Tracker class.

Parameters:
context

An object of the Context system class.

Method Detail

setErrorListener

public void setErrorListener (final ErrorListener errorListener)

Specifies an object of the ErrorListener class to receive error notifications.

Parameters:
errorListener

An object of the ErrorListener class.

trackAdEvent

public void trackAdEvent (final VideoAd ad, final String eventName)

Tracks an advertising event for an object of the VideoAd class.

Parameters:
ad

An object of the VideoAd class.

eventName

Name of the advertising event (Events).

trackCreativeEvent

public void trackCreativeEvent (final Creative creative, final String eventName)

Tracks an advertising event for an object of the Creative class.

Parameters:
creative

An object of the Creative class.

eventName

Name of the advertising event (Events).