Welcome to AdInMo’s SDK docume...
...
SDK Walkthrough
SDK Integration
Ad Placements and Debugging Tools
13min
impression validity to maximize your monetization it’s essential to understand what makes an impression valid here is a summary of what makes an impression valid time on screen rich media 1 second + 4 second cooldown with cooldown being the minimum amount of time between cycling (ad switching) through the portal you can increase the time an impression cycles before the next ad, from minimum of 4 to a maximum of 30 seconds slower cycles may impact monetization video ads 2 seconds of screen time and do not have a cooldown period the ad will be played in it’s entirety depending on demand, this may vary between 6 to 30 seconds in length audio ads audio ads will play a short 15 or 30 second audio ad to generate an impression device audio must be at 30% volume or higher for the ad to play audio ads have a cool off period of 5 minutes angle angle must be less than or equal to 55 degrees, the image must also be facing the camera size placement size in your project must be at least 1 5% (coverage) occlusion occlusion this relates to blocking the placement e g putting a game object in front of placement blocking it from the camera we recommend using the debugging tool to help optimise your placements to ensure they are generating valid impressions for more information on the debugging tool see below we recommend always setting your ad placements in places players are most likely to spend time the sdk now tracks dwell time as an attention metric the time a player spends looking at a valid placement optimizing for dwell time will drive higher cpms debugging tools adinmo’s debugging tools will help you optimise your placements enabling debugging tools within unity editor go to the top menu, adinmo > manager a new window will open with the debugging tools here you can also view your game key, placements and more enable basic debug to view impression validity and failed reasons enable advanced debug to get more detailed information for your placement such as the size and angle of the placement relative to the screen, as well as the name of the placement, the aspect ratio and the camera ‘looking’ at it either option can be selected both from the popup window or from adinmo manager prefab inspector make sure to select ‘debug on device’ as well before testing your build validity will be determined by the green strip on top of the placement when it turns from green to white will mean the placement has met all criteria and has been on screen for one second a valid impression has been registered occlusion test ignores layers this feature allows you to set specific layers to be ignored by the occlusion test an example of where this might be used is when a placement has a collision box that may result in impressions being lost this option can be found on the adinmo texture component this occlusion test only applies to viewability and does not apply to the click mechanic in cases where the click is occluded by a layer please check creating your first placement for more info fail reason too small placement is failing the placement size check placement is less than 1 5% relative to the screen angle to camera placement is failing the angle check, angle is larger than 55 degrees not facing camera placement is failing the angle check and not facing the camera not in shot placement is not on screen check if the correct camera has been assigned occluded an object occludes the placement causing less than 50% of the placement to be visible this applies to collision boxes as well partially off screen less than 50% of the placement is visible relative to the active camera placeholder image on the adinmotexture component there is an option to disable the default placeholder by default there is an adinmo placeholder, this will display when no ads are being displayed you can have your own placeholder image here by checking the disable placeholder option and adding your own to the texture update adinmo placements to work with urp when using a placement prefab in a urp scene, you will notice that the texture doesn’t render properly, and it will appear magenta, this is because the default shader isn’t urp compatible to solve this problem, you can select from the urp clickable materials we have created by selecting directly from the placement editor settings the placement should change to non magenta, indicating that it is working background setting you can set the space around your placement through the portal to better control how it looks in game you can choose to do this by colour matching or shrink the placement to fit the ad android player settings in unity 2019 and above, you may find that vulkan is selected by default the sdk will support vulkan as of version 2 1 1 and above with recommended android version 9 0 and above dynamic ads adinmo supports the concept of dynamic ads, these are ad placements that are created programmatically rather than through the unity editor this allows adinmo to support situations where a game developer programmatically creates objects in the game, our sdk supports the concept of then creating the ad unit programmatically once the object has been created here’s a simple example of how this works using the adinmo unity sdk using unityengine; public class instantiationexample monobehaviour { // reference to the prefab drag a prefab with an adinmo texture component attached to it into this field in the inspector public gameobject myadinmoprefab; // this script will simply instantiate the prefab when the game starts void start() { // instantiate at position (0, 0, 0) and zero rotation instantiate(myprefab, new vector3(0, 0, 0), quaternion identity); } } audio ads the sdk will detect the audio levels and if the master volume of the device is at 30% or more, an audio ad will play audio ads have a 5 minute cool off period audio ads are measured using listen through rates (ltr) make sure to set the audio prefab in scenes where users are more likely to spend at least 30 seconds to get the best ltr and monetization to set audio ads you need to add the adinmo manager prefab to your hierarchy add a canvas (you can use any existing canvas) and set a reference resolution preferably 1920x1080 drag and drop the audio prefab from the adinmo>prefabs folder onto the canvas the prefab is disabled by default, you can enable it to set the icon where you want it to be, just remember to disable it again it will automatically enable itself when an ad comes through audio ads are set to work with unity default audio as well as third party audio solutions such as fmod by default, the audio ad will play on full volume and will lower all other sounds when using unity default audio until the ad ends if you’re using fmod or other third party audio solution, you can use these exposed methods to catch when the audio ad starts and ends and set your volume levels accordingly static public void setaudioadstartedcallback(audioplaybackcallback callback) static public void setaudioadfinishedcallback(audioplaybackcallback callback) public delegate void audioplaybackcallback() the audio prefab doesn’t work as a persistent object if you want to have audio ads in multiple scenes you would need to set the audio prefab individually for each scene this is an example you can put in the class adinmomanager setaudioadstartedcallback(audioadstartedplaying); adinmomanager setaudioadfinishedcallback(audioadfinishedplaying); public void audioadstartedplaying() { debug log("audio ad started playing"); } public void audioadfinishedplaying() { debug log("audio ad finished playing"); } in our example scenes docid 4kjrnwi1d2 uldxncvjqd we have added a sound scene which can show you a working example of an audio ad integration