This documentation will go through all the steps required to display Ogury ads on your Android and iOS games built using Unity.
Create an account on the Ogury Dashboard.
In case you publish your application on both Android and iOS, you should do the following steps twice, once for the Android application and once for the iOS application. Otherwise just select the platform you publishes for.
Go to your Dashboard and register your application.
Copy the Asset Key from the Asset details, as shown in the screenshot below:
To import the latest version of the Ogury Unity plugin into your project, Ogury provides an Unity Package.
If you are upgrading it, delete the OgurySdk folder in your project Assets folder before following next steps.
Import the Unity Package into your project
Open your Unity Project.
Choose Assets > Import Package > Custom Package.
In the file explorer, select the package you have downloaded. The Import Unity Package dialog box appears, with all the items in the package checked.
Click on Import . The package content is added to the Assets folder
OgurySdk namespace at the beginning of every script where you interacts with the Ogury SDK.
The Ogury Unity plugin depends on the Ogury Android and iOS SDKs, so they have to be integrated into your Unity Project. However, if you are using Ogury as ad network in your mediation, the Ogury SDKs are probably already integrated in your project, so you must skip this step.
To import Ogury Android and iOS SDKs from the Ogury repositories, create an
OgurySdkDependencies.xml file in
Assets/Editor directory with the following content:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><dependencies><androidPackages><androidPackage spec="co.ogury:ogury-sdk:5.+"><repositories><repository>https://maven.ogury.co</repository></repositories></androidPackage></androidPackages><iosPods><iosPod name="OguryAds" version=">= 2.3.5"></iosPod><iosPod name="OguryChoiceManager" version=">= 3.1.8"/></iosPods></dependencies>
This default configuration allows you to import the latest version of Android and iOS SDKs. However, even if it recommended to use the latest versions, you can also choose specific ones.
For example, you could replace
>= 2.3.5 and
>= 3.1.8 by
3.1.8. In this case, please check the release notes for the compatibility between the Unity plugin and the chosen versions.
In the first scene of your application:
Right-click in the Hierarchy panel and click on Create Empty option.
Select the new GameObject.
In the Inspector panel:
Rename it to
Click on Add Component button and search for
Ogury Callbacks script.
Before calling any method of the Ogury SDK, you must configure the Asset Key as following:
Start method takes the following parameter:
the Asset Key of your application for the Android platform. You can use
null if your application is not available on Android.
the Asset Key of your application for the iOS platform. You can use
null if your application is not available on iOS.
If you do not have any Asset Key yet, you can refer to the first step to create them.
The European GDPR regulation requires obtaining the users' consent in order to display them personalized ads, (i) when the company processing personal data is based in the EU, or (ii) when the users are EU citizens.
As a company based in the EU, Ogury accordingly requires an explicit consent from the users to collect their personal data and display them personalized ads. The consent collection can be operated:
by the Ogury Choice Manager.
StartAds method will initialize Ogury Ads:
Congratulations, the Ogury SDK is now initialized! You are now ready to integrate your first ad. Ogury provides three different ad formats, (i) Interstitial Ads, (ii) Opt-in Video Ads, (iii) Banner Ads and (iv) Thumbnail Ads. You can refer to the following sections to proceed with the integration:
Ogury is part of the IAB Authorized Sellers for Apps initiative to fight inventory fraud for applications. It is recommended to update your
app-ads.txt to include Ogury as described in the app-ads.txt section.