Class NativeBeaconProcessorUtilsKt
-
- All Implemented Interfaces:
public final class NativeBeaconProcessorUtilsKt
-
-
Method Summary
Modifier and Type Method Description final static BooleanisNativeLifecycleVastBeacon(String type)Checks if a VAST beacon type is related to native ad lifecycle events. final static BooleanisNativeVideoVastBeacon(String type)Checks if a VAST beacon type is related to native video events. final static StringsubstituteMacros(String $self, NativeBeaconMacroData nativeBeaconModel, Map<String, String> extraMacros)Substitutes macros in a beacon URL with actual values from the beacon model and extra macros. final static BooleanshouldSendBeacons(AdLifecycleData $self)Determines whether beacons should be sent based on the ad lifecycle data and configuration settings. -
-
Method Detail
-
isNativeLifecycleVastBeacon
final static Boolean isNativeLifecycleVastBeacon(String type)
Checks if a VAST beacon type is related to native ad lifecycle events. Currently only impression beacons are considered part of the native lifecycle.
- Parameters:
type- The VAST tracker event type to check.- Returns:
true if the beacon type is part of native lifecycle, false otherwise.
-
isNativeVideoVastBeacon
final static Boolean isNativeVideoVastBeacon(String type)
Checks if a VAST beacon type is related to native video events. Video beacons exclude impression and click events.
- Parameters:
type- The VAST tracker event type to check.- Returns:
true if the beacon type is for video events, false otherwise.
-
substituteMacros
final static String substituteMacros(String $self, NativeBeaconMacroData nativeBeaconModel, Map<String, String> extraMacros)
Substitutes macros in a beacon URL with actual values from the beacon model and extra macros. This extension function replaces various predefined macros like timestamps, ad IDs, asset URLs, and playhead duration with their corresponding values.
- Parameters:
nativeBeaconModel- The beacon model containing macro replacement data.extraMacros- Additional custom macros to be replaced in the URL.- Returns:
The URL with all macros substituted with actual values.
-
shouldSendBeacons
final static Boolean shouldSendBeacons(AdLifecycleData $self)
Determines whether beacons should be sent based on the ad lifecycle data and configuration settings.
-
-
-
-