video-ad-sdk
Version:
VAST/VPAID SDK that allows video ads to be played on top of any player
16 lines (13 loc) • 415 B
text/typescript
import type {VastChain, VastEventTrackerOptions} from '../../types'
import {pixelTracker} from './pixelTracker'
export const trackIconView = (
_vastChain: VastChain,
{data = {}, tracker = pixelTracker}: VastEventTrackerOptions
): void => {
const {iconViewTracking} = data
if (Array.isArray(iconViewTracking)) {
for (const trackUrl of iconViewTracking) {
tracker(trackUrl, {...data})
}
}
}