Carefully read through the tutorial below on how to add our Unity SDK to your app for optimal performance and maximum revenue potential. We will guide you through how to sign up, register an app, import the SDK and place your first ad unit.
Our non-clickable In-Play™ ad units for brand awareness work as billboards, posters, signs and labels within the gameplay. Try also our seamless In-Menu™ ad units for maximum monetization. This is a clickable, performance-based ad placement that complements our In-Play™ format and works perfectly within the menu/UI of your game. When clicked on, the landing page opens up as a webview, hence your users never leave the game. Together, In-Play™ and In-Menu™ add not only brand awareness, but performance based brand advertising to your game, a phenomenon we would like to call one plus one equals three, in terms of performance output.
Prerequisites:
- Installed Unity versions 2018.4 or later
- Adverty Unity SDK version 3.3.0f1
- Some familiarity with Unity
Step 1: Sign-up and Log in
Go to Adverty.com and signup as a “Developer” by clicking on “Sign up” in the top right corner. When you have signed up you will receive an email to proceed with the account creation. When your account is created, log in and go to the Apps page by clicking on “Apps” in the left sidebar, which is where you manage your apps.
Step 2: Add your App
Add your app in the “App” tabs and follow the steps presented to you. Please make sure to create two separate apps for your iOS and Android versions. During the process, you will receive an API-key that needs to be entered in our Unity plugin later. You can at any time retrieve your API-key/s from the portal.
Step 3: Get the SDK
Go to “Resources”, located in the left side bar. Click on the icon that directs to the Adverty SDK. You will get to our repository. Download our unitypackage and import it to your project. For full SDK documentation click here.
Step 4: Add your API-key to the SDK
Go to the Tools->Adverty Menu and open the Settings tab. Paste in your application key and choose the correct platform for your application. (AR: Mobile AR, VR: Mobile and Desktop VR).
Step 5: Use sample script to start Adverty
Start an Adverty session when your app has been launched by calling Adverty.Init with UserData parameter. Also assign your GameCamera to AdvertySettings. AdvertySDK incorporates camera and rendering calculations on the main camera. This is important to ensure revenue for your ad units.
using UnityEngine;
using Adverty;
public class InitializeAdvertySDK : MonoBehaviour
{
private void Start()
{
//Create UserData and initialize Adverty SDK
UserData userData = new UserData(AgeSegment.Unknown, Gender.Unknown);
AdvertySDK.Init(userData);
Adverty.AdvertySettings.SetMainCamera(YourGameCamera);
}
}
Step 6: Place an Ad Unit to the Scene
Navigate to Adverty → Prefabs and place either a GameUnit (In-Play™) or a MenuUnit (In-Menu™) prefab into the scene view (In-Menu™ unit needs to be added to a Canvas). Adjust its size, shape and other properties in the Unit component.
Our In-Play™ units have the ability to change ratio and bend themselves to fit pillars and other cylindrical objects, using our SmartBend™ feature. To do a bent Unit you need to create a new AdvertyMesh. This is done on the Unit-component in the Unity Editor by clicking create mesh. When the mesh is created you can set size and bend settings (radius, bend axis, convex/concave).
Maximize your revenue potential by follow the recommendations below:
- Use both In-Play™ and In-Menu™ ads, in all available sizes.
- Get an ad to display on-screen within the first 15 seconds of gameplay.
- Establish a constant flow of In-Play™ ads visible on screen during gameplay.
- Never display more than 5 In-Play™ ads on-screen simultaneously.
- In-Menu™ ads are ideal for your game-over/revival popup menu.
Step 7: Add User Data & Consent for higher fill rates (very important)
Ad requests without a UserID (advertisingId, device ID) generate low fill rates. Similarly, ad requests with consent strings, user age and gender generate significantly higher fill rates and eCPMs.
Adverty SDK will gather device specific data when you call AdvertySDK.Init. If you pass in restrictUserData = true we will not collect any identifiers for that particular user. Information about the user such as Gender, Age and Consent String should be collected before the Init call. For more information about how to do it refer to UserData and AdvertySDK.Init in the documentation.
Step 8: Update your App-ads.txt
Programmatic advertising requires valid app-ads.txt files at all ends of the pipeline.
Adding Adverty entries to your website’s app-ads.txt is therefore essential in order to get any fill on the ad units.
You can find the Adverty additions to your app-ads.txt in the portal. If you are new to app-ads.txt, it is an industry mandatory file hosted on your web page, authorizing you to sell ad placements created with our SDK inside your apps.
Step 9: Placeholder ads & cross-promotion
No ad provider can deliver 100% fill rate. When there is no ad available, you can:
- Add a placeholder image, such as your company or game logo, or any creative that fits naturally within the game (“Nuka-Cola”). Simply exchange the texture on your unit to what you want. Then reassign the texture at AdvertyEvents.UnitFailedActivation
- Hide the ad unit or make it transparent. Publisher is in control of how to show units by using UnitActivation and UnitFailedActivation events. To hide a Unit simply disable the MeshRenderer and Adverty SDK will activate it when an ad is loaded
- Cross-promote your other titles. To do this please send the ad creatives to publisher-support@adverty.com
Step 10: Verify integration and viewability using Sandbox
To verify your Integration you should use our Sandbox feature, which is enabled through UnityEditor in menu Tools → Adverty → Settings → Sandbox Mode.
With Sandbox enabled you can verify your integration in the editor and on devices. One mandatory step is to verify the viewability, as advertisers prioritize games with high viewability and ignore games with low viewability. To gain advertiser’s interest, and optimize your revenue generation by establishing high viewability rates for your game, please make sure your ad placements are properly displayed on-screen by verifying the viewability using our ImpViz™ feature or listening to the UnitViewed event.
Our SDK tracks the viewability for every ad unit. More information on how to use ImpViz™ can be found here. We also recommend you to read our best practices for ad viewability guide here. A game with too low viewability in Sandbox mode will not be allowed to go live.
Step 11: Go Live!
Once your integration is done, verified on devices and ready to be pushed to the app stores, you should set your app to “Live” in the portal. This notifies us and we will review the data collected in the Sandbox mode to make sure your integration is optimized for success. We might be suggesting a few improvements to boost your performance and revenue potential. Once everything is fine we will put your game live.