Construct 2: Mopub Ad ID does not work, only Admob works? [Android]


#1

Hi,

I use the official Cocoon Ads plugin from Github and followed the Example Template and instructions correctly. When I place Mopub Ad Unit IDs, No ads are shown (I tried waiting for around 1.5 days)… however, when I place Admob ID there, the Ads show instantly!

Although it says I can input either: Mopub or Admob IDs.

I have already tried including all Mopub related official Plugins during compilation, such as Admob adapter for Mopub, and Mopub Cocoon Ads plugin, etc. No luck.

I seriously think there is a bug… Can someone please help?

Thanks


#2

Hi Hasan,

First of all sorry for the delay. Are you configuring the IDs in the Construct 2 interface or the Cocoon cloud interface?. You should add them in Construct 2. One of our Developer Advocates @andy_reitberger has written a set of tutorials and some of them related to Ads configuration. You can take a look at them here:


https://shatter-box.com/knowledgebase/cocoonio-how-to-build-a-game-using-construct-2/#document-3

We have users that have been successfully using the Cocoon Ads plugins so they should be working fine but there might be some bug so if you could send us a Construct 2 .capx, that would help us a lot to track down the issue. Also the logcat logs can shed some light on this.

Thanks for using Cocoon!


#3

Thanks @imanolm1

I have been using AtomicPlugins and also implementing and compiling it correctly by following the example templates and instructions, as I already mentioned. In fact, it works perfectly when I put Admob IDs directly (banner and fullscreen), however, just doesn’t show any ads when MoPub IDs are entered the same way.

Please find a capx test case with MoPub IDs here:


Construct 2 version = r216 (latest stable)

You may change my MoPub IDs to your own MoPub IDs if you want. I suggest having Admob mediated within MoPub which will help speed up the testing process since Admob should show Ads instantly (as it always does with old compiler using CocoonJs).

Hope this helps.


#4

I’ll check your capx file, but I cannot open it. Can you please attach the Plugin “CocoonJS back button”.
Btw, you don’t need this plugin. You also can use the Browser Plugin by C2. The action “on back button” works on canvas, too.

Regards
Andy


#5

Thanks Andy,

I just realized that I already had replaced it by using the Browser object’s back button feature in event-sheet, while using the new Cocoon compiler. Just forgot to delete the CocoonJsBackButton from C2.

cocoonjsback.zip (6.7 KB)

Attached.

Thanks


#6

Hi @hasan
thank you for the plugin. Did you add the Plugin for the mopub SDK, too?

Then if you your code works fine for AdMob and not with mopub it could be that the SDK is missing.

Thank you!


#7

Thanks Andy,

I did use the MoPub plugin (as you showed in the screenshot), however, no Ads were shown at all, not even Admob. Zero impressions or requests.

Ads only show when I place Admob Ad Units (in Construct 2).

Can you please try with MoPub Ad IDs, and compiling using Canvas+ (Android) and see if you are getting any impressions? I waited for almost 2 days and no luck.

Thanks.


#8

Thanks for the information :wink:
I will try it on my end with my mopub ID’s. Once I have results, I will let you know!

Regards
Andy


#9

Hi @hasan
Sorry for the delay. I have test it on my end and it works perfect with my mopub ID’s. I guess the issue comes from your ID’s or an conflict of the installed Plugins. Can you try to remove the AdMob SDK Plugin, so that only the Mopub SDK Plugin is installed?
I created a code example for construct 2 which is working for me. You also can try my ID’s to test your code. Those ID’s are working for sure.

I made a tutorial for you here (there you can find my ID’s and the code example).
https://shatter-box.com/knowledgebase/cocoonio-cocoonads-with-mopub/

Let me know if it works for you, too.

Regards
Andy


#10

Thanks Andy, that’s awesome…

Yeah I think I always had both Plugins installed at Cocoon… I’m gonna remove the Admob SDK Plugin.

Let me try it out, I will respond here with the result soon…

Thanks again!


#11

You’re welcome, looking forward to your report.

Regards
Andy


#12

Sorry for the delay Andy, I tried a LOT of things in the last 24+ hours.

I am really frustrated now… It still didn’t work for me :frowning:

I did remove the Admob plugins, had only MoPub one as you showed. I also tried your MoPub IDs, and tried mine too, either way got no luck!

May I ask:

  1. How long did you have to wait before Ads start showing?
  2. Did you try using Android and Canvas+ ?
  3. Did you use this plugin also?

No, I didn’t use it, and I couldn’t anyway, it gives me compilation error if I try it.

Anyway, I also checked again using Admob IDs (in Construct 2), to make sure if my Capx and Calling of Ads are alright, and it showed me Admob Ads instantly!..both Banner and Fullscreen.

I have absolutely no idea what’s going on :frowning:

I really appreciate your support though, and I feel bad things are not working out at my end.


#13

Hi Hasan,

I’m sorry to hear that. Have you tried to use your ID’s in my code example?
For me the ads were shown instantly when I had pressed the button for showing the ads.

No I haven’t used the plugin you mentioned. I will try your project with my ID’s when I’m home from work. It’s pretty early in Germany atm.

I’ll keep you posted.

Regards
Andy


#14

Hi,

Andy, I could not test with your Example capx since I cannot create any more projects (due to the 2 Project limit in free Cocoon.io compiler and I already have both projects occupied).

By the way, I am currently in contact with MoPub support team as I am noticing some more weird problems with my MoPub data, which also includes Admob’s data discrepancy, etc. And they will get back to me soon. (Perhaps it is something related?) I will let you know.

However, can you please try my MoPub Ad Unit IDs in your Example capx and see if you are getting any Ads?

My MoPub IDs:
Banner: 93898a1932ab4124ad651fd118838986
Fullscreen: 463e634f398240fbb0083c7eb777add8

I hope that just like Admob, MoPub also does not verify the App domain (com.which.app) before initiating the ad requests? Like in Admob, we can post any ID anywhere and the Ads will show …if MoPub cross-checks the App domain then none of us can test each others’ MoPub IDs…

Anyway, thanks, and sorry for the trouble,
Please let me know,
Regards,
Hasan


#15

Hi Hasan,

sorry for the late respone. I tried it with your ID’s and the ads are working fine on my end.
So the ID’s are fine.

Now the issue can only come from your C2 project or from the cloud settings.
Would you please create a Developer App from your Project and send me the apk file?

Thanks!


#16

Thanks Andy,

That’s interesting… so I can assume that my MoPub is fine, Admob mediation is working, Ad Unit ID is ok as well. That’s a relief.

As you suggested, I compiled a Developer App from my project (with relevant plugins selected). I’m confused why does the finished compiled and exported APK simply runs a Cloud Cocoon.io Launcher (where it asks to select a URL or ZIP), shouldn’t I be having a running apk of my game with FPS and console?

Anyway, I attached both: The Developer App (which acts like a launcher), and also the ZIP file of exported Cordova (without minify) from Construct 2.

Download: ZIP file and Developer App

Note: the game is heavy, and also incomplete. However, it should load Banner and Fullscreen ads on Start of Layout, and it is asked to show the banner when you destroy each Asteroid, and it has to show a fullscreen ad when an Asteroid destroys our spaceship.

(I know it is a complicated game already, but trust me, I tried the same with a simpler game, and MoPub ads didn’t show - I just don’t have more projects remaining to create a new Test Case anymore)

Please review the game and console and let me know your findings…
Thanks,
Hasan


#17

Hi Hasan,

thanks for both files. The Developer App allows you to test the cordova export files coming from C2 directly. So you don’t need to build for each little change a new apk file. With the Developer App you just need to export your game via Cordova, zip it and run it with the Developer App.
Then if you think your game is ready, you can compile a final apk file and upload it to the store.

I tested your zip file and it crash after a few seconds of game play. I saw the banner ad, but the game always crashs befor I collide with an asteroid.

So I tested your earlier example “Bug Test Case” file and also there your ads are working for me (with your Developer App).

Regards
Andy


#18

I have a question… I have make an game using cocoon.io and added admob plugin. But not finding any place to insert my ads id. Where to find the ads id?


#19

It depends on your framework. If you are using Construct 2, you must add the “CocoonAds” plugin to your project.
There you can add your IDs.

Best
Andy