On CocoonJS level: submit form for CocoonJS premium account (it should be somewhere in CocoonJS dashboard)
If you already have CocoonJS premium account then:
1. select your project in CocoonJS
2. go to services > configuration
3. in 'ads services' change from 'not enabled' to 'MoPub'
On Construct 2 level: add CocoonJS plugin to your application, and use it to show banners
For example: on start of layout > show banner ad bottom-center
If there are some places (like menus) where you don't want to show banner - use CocoonJS condition "is showing banner ad" to hide banner
Step A - Create account on AdMob + add app info + get AdMob ID (easy way: don't close tab with AdMob ID page)
hint: on old AdMob page ID is visible as "Publisher ID"
Step B - Create account on MoPub + add app info + create banner and get MoPub ID (easy way: don't close tab with MoPub banner ID)
then on MoPub:
1. Go to big grey NETWORKS tab
2. Click "Add a Network"
3. Choose "AdMob" network
--- if you don't see this, then turn off AdBlock etc. ---
4. Now you will see Networks (1) | Segments (1)
5. Click on "AdMob" link under Networks (1) and then "Edit Network", then "Edit Section" over "Set Up Your Inventory" - add your AdMob ID in right place (next to your app) and save changes
6. Go back to "Networks" and click Segments (1), and then on "Global Segment", there put 0.01 USD under "Network CPM" and click "Set" button, so set this CPM
Everytime, for every app you have to put new AdMob ID and setup 0.01$ Network CPM (in other case MoPub will not show any ads)
Step C - go to CocoonJS, select your project and go to Services > Ads. Select "Google PlayStore" tab, paste your MoPub ID into "Banner AdUnit" and tick "AdMob" by "MoPub Networks". Then click "Update" button.
Step D - Compile your CocoonJS project and check if everything works on debug-signed APK. If you don't see AdMob ads - then check your app 10 minutes later. If still nothing - then have more patience :D
Q: Oh my God! Sometimes I see AdMob banner, sometimes not! What happened?! ;___;
A: Relax, it's only fillrate issue. If your app sends 100 requests, then sometimes AdMob don't have any ads to show. So if you have 100 requests but 90 ads to show, then fillrate is 90%. If you have 100 requests but 50 ads to show, then fillrate is 50%. Comparing to any other network AdMob have very high fillrate (in my case: 93-94%)
Q: Show banner top center or bottom center?
A: From my experience you can get +50% clicks on bottom center
Q: This should work no matter where it is published to right? My cocoonJS projects get put on iTunes, Google Play, Amazon (Kindle/Android) and Barnes and Noble (Nook)
A: In CocoonJS dashboard go to Services > Ads and you will see:
- Apple AppStore
- Google PlayStore
so for each above appstore you should put different MoPub ad unit. Also Apple AppStore compilation should use iOS banner from AdMob and Google PlayStore compilation should use Android banner from AdMob.
Q: Where to put all those crazy IDs?
A: paste AdMob ID in MoPub dashboard (in field Publisher Id)
paste MoPub ID in CocoonJS dashboard (in field Banner AdUnit)