As of r269 we are trying out a new advertising technology, Google's Ad Placement API.
Currently it is only possible to show ads in mobile exports. This new feature allows to show ads in web exports, so it opens up a new venue for monetization.
The current implementation is rolled up together with the mobile ads in the Mobile Adverts plugin, this is because the API's are very similar, the idea being that the same project can show ads whether it is exported for mobile or web.
The most important thing to remember is that web ads will not just work on any website. You will need to get the website that is going to host your game to be whitelisted. This means that ideally you should control this website, to be able to update it.
First let's go over the things you will need to set up before any of this works.
Adsense
- Sign up for an Adsense account.
- You will need a website which is whitelisted to show ads.
- Fill in this form to indicate interest in using the Ad Placement API.
How do I whitelist my website?
- Visit the Sites options in the left hand side menu of your Adsense account.
- Find the Add site button and click it to start adding your website.
- Follow the steps.
- You will need to modify the root of your website by adding a small script to it.
- Request a review.
After sometime, hopefully your website will be approved and your game will be able to show ads.
Plugin setup
The plugin properties have changed a little bit to accommodate for the new changes. There are two groups Mobile export and Web export, these are just cosmetic and highlight to which kind of export the properties are related to.
The Publisher ID property makes a return after being removed in a previous release. Now it only affects web adverts, so if you are just using the plugin for mobile, you don't need to add it.
If you need it, it can be found in the left hand side menu of your Adsense account in "Account" -> "Account information"
Differences between Mobile and Web
Ad units
If you only want to show web ads, it is not necessary to provide ad units in your actions, the field can be left blank. If you are planning to use the same project for web and mobile though, you will still need to provide them.
Supported ads
This new API only supports two types of ads: Interstitial ads and Rewarded ads. Banner ads are not supported, trying to show them in a web export will have no effect.
About Rewarded Ads
There is a slight difference between rewarded ads in mobile and rewarded ads in web that should be considered.
In mobile when the ad is viewed you can use the RewardType and RewardValue expression to get information about the reward and this information is set in your Admob account through the ad unit.
In a web export, because you don't use ad units, the rewarded ads will always return the value "Reward" for the RewardType expression and the value of "1" for the RewardValue expression.
For this reason it is recommended to use the Platform Info plugin to decide what to do after a rewarded ad is viewed, depending on what platform the game is running on.
GDPR related actions, conditions and expressions
Currently there is no support for consent gathering in a web export, so the Show user consent dialog action does nothing. This might change in the future.
ConsentStatus and IDFAStatus expressions will always return "UNKNOWN" and "not-determined" respectively.
The condition is in EEA or unknown will always evaluate to "true".
Set max advert content rating, Tag for child directed treatment, Tag for under age of consent and Request IDFA actions are not supported in a web export.
Ad blockers
Be aware that web adverts are treated just as any other advertising technology in web, so it will be blocked by ad blockers. Remember to configure your ad blocker to ommit preview.construct.net to see the test ads when developing in Construct and localhost if your are working on your own website.
This is all still in beta
This is not only true on our side at Scirra, but also on Google's side. What I am trying to say is that things might change in the future.
That should cover everything for now, let us know how this works out for you!