Class: AdEvents

AdEvents(adSessionnon-null)

Ad event API enabling the JS component to signal to all verification providers when key events have occurred. The OM SDK JS service will allow only one ad events instance to be associated with the ad session and any attempt to create multiple instances will result in an error.

Constructor

new AdEvents(adSessionnon-null)

Parameters:
Name Type Description
adSession AdSession The ad session instance for sending events.
Source:
Throws:
  • error if the supplied ad session is null.
  • error if an ad events instance has already been registered with the ad session.

Methods

impressionOccurred()

Notifies all verification providers that an impression event should be recorded.
Source:
Throws:
error if the native ad session has not been started.

loaded(vastPropertiesopt, nullable)

Notifies all verification providers that a loaded event should be recorded. Video/audio creatives should supply non-null vastProperties. Display creatives should supply a null argument.
Parameters:
Name Type Attributes Default Description
vastProperties VastProperties <optional>
<nullable>
null containing static information about the video placement. This is non-null for video/audio creatives and null for display creatives.
Source: