How to display companions on page load and have back-fill?

129 views
Skip to first unread message

cole.he...@alphamediausa.com

unread,
Apr 22, 2019, 3:23:03 AM4/22/19
to Interactive Media Ads SDK
The article at this page: https://developers.google.com/interactive-media-ads/docs/sdks/html5/companions says that you can have the companion ads load on page load, before a play is initiated.  I am using the GPT example and it works upon clicking play, however I need the companions to load before a play is initiated to not make the layout look broken.

How can I achieve this as none of the examples show this but it does mention you can?
Where in Google Ad Manager can I setup the backfill line items for when a companion ad is not served with the video pre-roll?

Thanks!

ima-sdk-fo...@google.com

unread,
Apr 22, 2019, 7:16:59 AM4/22/19
to ima...@googlegroups.com

Hi Cole,


Thank you for reaching out to us.


The Pre-loaded ad slots example (Number 3) lets you load the companion ad upon page loads and before the play button is initiated, refer to the embedded Codepen editor. Could you confirm if this is what you need?


With regard to your inquiry on Google ad setup, I’m afraid this forum only supports IMA SDK related issues. That said, I would suggest reaching out to Google Ad Manager help center for further assistance about your inquiry.



Regards,

Sherwin Diesta

IMA SDK Team




--
You received this message because you are subscribed to the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ima-sdk+unsubscribe@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.

cole.he...@alphamediausa.com

unread,
Apr 22, 2019, 2:38:11 PM4/22/19
to Interactive Media Ads SDK
Thanks Sherwin.

I have done the #3 example but the companions that are uploaded in the video line item still don't show until play is hit.  How do I get the companion ads that are uploaded in the video line item to display on page load rather than on play?  Reading the documentation makes #3 look like it is filling those ad unit spots with other ad units before play.

I was under the understanding that I could get the actual companion ads that are in the video line item to show on page load prior to the user hitting play.

ima-sdk-fo...@google.com

unread,
Apr 23, 2019, 4:02:07 AM4/23/19
to ima...@googlegroups.com

Hi Cole,


Thank you for your response and clarification.


Could you share the VAST tag that you're using for us to investigate further?


However, this seems to be a creative setup issue rather than IMA SDK. I would suggest checking out this Google ad manager Companion ad documentation particularly on the disableInitialLoad method.



Regards,

Sherwin Diesta

IMA SDK Team


cole.he...@alphamediausa.com

unread,
Apr 23, 2019, 3:41:05 PM4/23/19
to Interactive Media Ads SDK
This is the tag that I am using -> https://pubads.g.doubleclick.net/gampad/ads?iu=/52278197/TEST_Stream_PreRoll&description_url=[placeholder]&env=vp&impl=s&correlator=&tfcd=0&npa=0&gdfp_req=1&output=vast&sz=640x480&ciu_szs=300x250,320x50,728x90&nofb=1&unviewed_position_start=1

Also here is how I have the head section setup, I am following all the instructions in the documentation.  The ad units only load once the play is initiated.

<script async="async" src="https://www.googletagservices.com/tag/js/gpt.js"></script>
            <script>
var googletag = googletag || {};
  googletag.cmd = googletag.cmd || [];
</script>
<script>
googletag.cmd.push(function() {
var sizeMapping = googletag.sizeMapping().
addSize( [0,0], [320,50] ).
addSize( [960,0], [728,90] ).
build();
    googletag.defineSlot('/' + '<?php echo $dfp_account; ?>' + '/' + '<?php echo $dfp_station_id; ?>' + '_StreamPreRoll', [[320, 50], [728, 90]], 'div-gpt-ad-1551743913277-0').defineSizeMapping(sizeMapping).addService(googletag.companionAds()).addService(googletag.pubads());
    googletag.defineSlot('/' + '<?php echo $dfp_account; ?>' + '/' + '<?php echo $dfp_station_id; ?>' + '_StreamPreRoll', [300, 250], 'div-gpt-ad-1551911069371-0').addService(googletag.companionAds()).addService(googletag.pubads());
    //googletag.pubads().enableSingleRequest();
    googletag.pubads().collapseEmptyDivs();
    googletag.companionAds().setRefreshUnfilledSlots(true);
          googletag.pubads().enableVideoAds();
    googletag.enableServices();
  });
</script>



On Tuesday, April 23, 2019 at 1:02:07 AM UTC-7, ima-sdk-forumadvisor wrote:

Hi Cole,


cole.he...@alphamediausa.com

unread,
Apr 23, 2019, 3:43:46 PM4/23/19
to Interactive Media Ads SDK
Sorry the tag did not post properly

https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/52278197/TEST_Stream_PreRoll&ciu_szs=728x90,320x50,300x250&impl=s&gdfp_req=1&env=vp&output=vast&nofb=1&unviewed_position_start=1

cole.he...@alphamediausa.com

unread,
Apr 23, 2019, 3:45:52 PM4/23/19
to Interactive Media Ads SDK
I don't know why the URL is not posting properly.

<script>
 
var url = '
https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/52278197/TEST_Stream_PreRoll&ciu_szs=728x90,320x50,300x250&impl=s&gdfp_req=1&env=vp&output=vast&nofb=1&unviewed_position_start=1'
</script>

ima-sdk-fo...@google.com

unread,
Apr 24, 2019, 1:06:52 AM4/24/19
to ima...@googlegroups.com

Hi Cole,


Thank you for sharing these information. However, this forum only supports IMA SDK related implementation. I’m afraid companion ad setup through Google Ad Manager is out of scope of our support.


That said, I'll reroute you to the Google Ad Manager team regarding your concern. I would also suggest reaching out to Google Ad Manager Help Center for further assistance about the creative setup.



Regards,

Sherwin Diesta

IMA SDK Team


--
Reply all
Reply to author
Forward
0 new messages