How to show Display/banner ads?
britzl opened this issue · 2 comments
The documentation/wiki mentions that gdsdk.showBanner()
is deprecated in favor of gdsdk.showAd()
.
Further down, there is documentation for Display Ads which are shown using
gdsdk.showAd(window.gdsdk.AdType.Display, { containerId: "CONTAINER_ID_TO_PUT_AD_IN"});
I assume this is the replacement for the deprecated gdsdk.showBanner()
function?
I created an html <div>
element with size 728x90
<div id="canvas-ad" width="728" height="90"/>
But when testing I see in the console the following error:
gameDistributionV1.3.min.js:2 No fitting size found for slot 'gd__banner@canvas-ad' with max ad size 0x0
Is there a full example of how to create a div and show a Display Ad somewhere?
Here is a working game css example. Probably this is a css issue. Can you try to set width and height into style property?
If you want to see, https://html5.gamedistribution.com/0a7b14bd07ac46029ebc8939cce18079/ here is working example, containerId=advertisement_title
Best Regards
Thanks! That did the trick!