Knowledge base

Intro to Ad Placements

What are ad placements

Ad placements allow you to have better control on where and how your ads are shown in the game.

The default placements for your game are:

  • default placement: Skipping enabled after 5 seconds
  • Rewarded placement: No skipping allowed

When should I use the different placements?

You can show (typically skippable) advertisement videos using the default placement. This is a common practice for interstitials.

If you wish to show rewarded ads - where a user gets a coin/gem/extra life for watching a video, you can use a placement with skipping disabled.

If you need more than the two default placements (for e.g. tracking), you can create new placements in the Ads dashboard.

How to select which placement to show?

You can use the placements by calling them from your game's code. You can also edit or create new placements.

It's up to you when to actually show the ads, but to get an idea about using different placements, take a look at our example game (Space Ads):

https://github.com/Applifier/unity-ads-demo

Code examples for Unity Ads package and the Unity Services window -based integration

Using different placements in Unity Ads inside Unity C# code is simple. Just add the placement ID in the call parameter

    if(Advertisement.IsReady("PLACEMENT ID")) {
        Advertisement.Show("PLACEMENT ID");
    }

If you want to use the default placement, you can omit (or pass null) the parameter

    if(Advertisement.IsReady()) {
        Advertisement.Show();
    }

Note: remember to use the same placement ID for the IsReady() and Show() calls.

Code examples for native iOS

With native SDK integration you must either A) always use the default placement or B) remember to call setZone(""); before each show call

if ([[UnityAds sharedInstance] canShow]) {
    [[UnityAds sharedInstance] setZone:@"PLACEMENT ID"];
    [[UnityAds sharedInstance] show:....];
}

Code examples for Android

With native SDK integration you must either A) always use the default placement or B) remember to call setZone(""); before each show call

if(UnityAds.canShow()){
    UnityAds.setZone("PLACEMENT ID");
    UnityAds.show(options);
}
Still need help? Get in touch!
Last updated on 24th Feb 2017