Welcome to AdInMo’s SDK docume...
...
SDK Walkthrough
Hybrid Monetization Tools
IAPBoost
19min
with iapboost campaigns you can promote your iap offers in game for a frictionless player experience you can utilize any ingameplay ad format (display, rich media, or video) and your creatives for consumables etc will appear in the standard ad placements during gameplay when players click on an ad, the game pauses, and the ingameplay magnifier highlights the iap offer players can then choose to proceed with the iap purchase in the usual way or close the ingameplay magnifier to resume gameplay once the purchase is finished, gameplay is unpaused iapboost campaign setup to set up your iapboost campaign using the campaign manager select the iap item/pack you want to promote within your game and set its iap id (product id in google play, apple store and samsung store, sku in amazon store) to reference the campaign in your code you can run multiple campaigns at the same time and create dependencies between them to optimize your iap conversion strategy set the campaign set general campaign details such as the campaign name, purchase caps and limits campaign dependencies set campaign dependencies which will send your campaign to players if certain conditions are met (for example, if a player has not made a purchase of campaign a, they will not receive an ad for campaign b) flight period set your campaign flight period, targeting and tracking adding creatives last but not least, add your appropriate creatives iap purchase flow pre click visualizer your iapboost ad is displayed to the player using standard ingameplay ad placements we recommend using the pre click visualizer options to let your players know that the placement is clickable and the offer is actionable (see below) ingameplay magnifier the player clicks on the ad placement and the ingameplay magnifier highlights the iap offer a callback takes place and the game is paused the player can click on the offer to proceed to purchase or can exit the offer by clicking anywhere else on the screen or on the close button and gameplay is resumed iap transaction if a player wishes to proceed, the next click activates the platform specific iap transaction mechanism and via the callbacks the player can seamlessly complete the purchase within the game removing the need to wait for a break in play to complete the iap purchase once the payment transaction is completed, the iap is credited to the player and is immediately available to use the player returns frictionlessly to the gameplay and resumes gameplay other settings creative assets creative assets for iapboost campaigns can be uploaded via the developer portal they will be served into your games at the most appropriate times based on the server logic described below serving logic iapboost ads can be served when no paid ad is available machine learning will determine the right time to show an iapboost ad to a player based upon previous campaign performance exclude serving the offer again if the maximum number of all time purchases have been made exclude serving the offer again for that day if the maximum number of daily purchases have been made allow a cool down period before serving the offer again if it is a repeat purchase offer single use vs repeat iaps daily caps and all time caps on iaps are supported as well as an ‘iap cooldown’ period our serving logic will adhere to the rules you set around caps and cooldown periods if no rules are set, after purchase the campaign will have a 1 hour cooldown after which the ad may be served again tracking campaign performance data is available via the developer portal best practice would be to allow for all your iap ids to be tracked via our callbacks this way our algorithms will be able to more closely monitor the purchase probability for each individual player and choose the right time to show them an offer setting up iapboost callbacks it is recommended to report all in app purchase events , to optimize targeting and campaign delivery implement the following callbacks when enabling iapboost campaigns static public void setinapppurchasecallback(inapppurchasecallback pfn); this callback is used to tell the game that the player has requested to purchase an iap using adinmo’s iapboost interface and the developer is required to handle the iap process and call inapppurchasesuccess or inapppurchasefailed after the process has completed delegate is defined as below, where iap id is the store id of the iap delegate inapppurchasecallback(string iap id); public static void adinmomanager inapppurchasesuccess(string id, string isocurrencycode, float localizedprice, string transactionid); call this to indicate to the sdk that a successful in app purchase has been made, where id is the store id of the iap, isocurrencycode is the currency code eg usd, localisedprice is the price of the iap in local currency, and transactionid is the transactionid of the purchase, (for anti fraud purposes) public static void adinmomanager inapppurchasefailed(string id, string isocurrencycode, float localizedprice, string failurereason); call this to indicate to the sdk that a failed attempt has been made to make an in app purchase, where id is the store id of the iap, isocurrencycode is the currency code eg usd, localisedprice is the price of the iap in local currency, and failurereason is a reason why the purchase failed where possible please use standard google or apple reason codes here is an example of the above callbacks in a script using unityengine; public class iapboosthandler monobehaviour { void start() { // set the callback for iap requests adinmomanager setinapppurchasecallback(oninapppurchaserequested); } // callback function for handling iap requests private void oninapppurchaserequested(string iap id) { debug log($"iap requested {iap id}"); // simulate purchase process (replace with your iap library logic) bool purchasesuccessful = simulatepurchase(iap id); if (purchasesuccessful) { // notify adinmo of a successful purchase adinmomanager inapppurchasesuccess( iap id, // store id of the iap "usd", // example currency code 4 99f, // example localized price "transaction12345" // example transaction id ); } else { // notify adinmo of a failed purchase adinmomanager inapppurchasefailed( iap id, // store id of the iap "usd", // example currency code 4 99f, // example localized price "payment declined" // example failure reason ); } } // simulated purchase logic for demonstration purposes private bool simulatepurchase(string iap id) { // replace this with your actual iap processing logic debug log($"processing purchase for iap id {iap id}"); return random value > 0 5f; // randomly simulate success or failure } } price localization you can show localized prices in the magnifier cta button to set this up you need to add this callback adinmomanager setinapppurchasegetpricecallback(getprice); in the store start method where getprice is defined as public string getprice(string item) { if (storecontroller != null) { foreach (var product in storecontroller products all) { if (product definition id == item) { return product metadata localizedpricestring; } } } return null; } in our example scenes docid 4kjrnwi1d2 uldxncvjqd you can find a working example of a iapboost setup with the price localization included the code can be directly copied and adapted to your game you can add the callbacks to any script you wish or create a separate script solely for the iapboost callbacks and attach it to an empty object