IMA3/HTML5 - GetCompanionAds just won't see the companion ads in the response.

0 views
Skip to first unread message

Angus Kirkwood

unread,
4:45 PM (3 hours ago) 4:45 PM
to Interactive Media Ads SDK
IMA3 HMTL5 SDK

VAST url (google's test ad)  and has 2 companion images
https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=


I can play the video ad and query every aspect of the Ad, except for the Companion.

we have...
 const ad = adEvent.getAd();
 const companionAds = ad.getCompanionAds();

and later....
 if (companionAds.length > 0) {
     const firstCompanionAd = companionAds[0];
     console.log('First Companion Ad:', firstCompanionAd);
     console.log('Companion Ad Content:', firstCompanionAd.getContent());
 } else {
     console.log('No companion ads found.');
 }

The object 'companionAds' is always 'undefined'.


I am in need of help on this one.



Reply all
Reply to author
Forward
0 new messages