Ads are not showing up in my game

Hi guys, I’m implementing Y8 SDK in my game. I created a Y8 storage account and uploaded my HTML5 game on it. The login system is working properly. I’m now trying to show ads following the documentation. I initialized ads after SDK initialization like this:

<script type="text/javascript">
  ID.Event.subscribe('id.init', function() {
    ID.ads.init('12345');
  });
</script>

Then I called the following method when players start a match in my game:

// Pause game and sounds
ID.ads.display(function() {
    // Resume game and sounds
});

But every time I’m getting this error:

sdk.js:9 Waiting for ad strategy
No retries left, giving up

Why is that? I’m not able to show any ads because of this.

I have noticed that in the application creation page, there is a message at the top saying:

Using In-Game ads requires using two features.

What is the meaning of that? Mine is a multiplayer game that supports Y8 Login, Ads, Protection module etc. Are they considered as features?

Hey Chang!

Can you share the game name/slug? I would take a look at your ads code.

Keep in mind that ID.ads.init('12345'); needs your actual game ID, do you have it? (‘12345’ is just an example value)

Hi gintaras_the_best!

Yes, of course I have added proper game ID during initialization. And this is how I displayed the ad:

ID.ads.display(function () {
    // Resume game and sounds
});

Will the ads be available only after review? Currently my app is in draft.

I see that you are using APP_ID instead of the GAME_ID:

    initAd() {
        ID.ads.init(window.y8Manager.appId);
    },

Which is not correct. You need to submit the game and ask support for the GAME_ID to add (I know that it’s cumbersome - not my idea :D, I’ll improve this in the future)

Sent you game ID in PM

Thank you, that fixed the issue, now ads are showing up. @Ankit has shared the game ID with me. :slightly_smiling_face:

I also wanted to know whether we have any option to check the status of the ad on the callback function (whether ad showed successfully or not). Because, right now there is no such option for it in the callback:

ID.ads.display(function() {
    // Resume game and sounds
});

I think that’s one of the shortcomings of the current SDK ads implemetation. Do you want this information for statistics? AFAIK, the SDK ads are not meant to be used as “reward” ads.

This will be improved in the future, but that’s a couple months away

I was trying to use it as rewarded ads in the game. This is kind of an important feature in the game actually. But if I can’t get the status of the ad in the callback, that won’t work as intended.

Maybe you can try H5 ads, not the part of sdk yet but it does support reward ads. also we can share you revenue via AFP (Adsense for Platform), where you will receive your Y8 revenue directly with your adsense/admob earnings from google.

1 Like

Yeah, in that case you’d need to use regular H5 ads setup. We should be able to add this to the SDK in the future, but that’s a bit further away.

Ok, that’s good to know. Is it possible to integrate both Y8 ads and AFP at the same time?

Yes, you can use Y8 ads and receive your earning via google.

Y8 Games