How to Start Implementation
Being part of Ciao Games family, we need the following items to be implemented in the game.
Consider this as an integration checklist of what your game needs to have.
For details on each API, see the API Reference as well Common Flows.
If you already work with Ciao Games and want to integrate CiaoSDK, here is a useful guide:
Migrating from older Ciao Games integrations
1. Consent
CiaoSDK needs a consent object to be initialized, thus it must be initialized after your consent logic.
When done, create and set a CiaoConsent: CiaoConsent
// Build consent from your consent UI (UMP / ATT / etc.).
CiaoConsent consent = new CiaoConsent(
gdprConsent: true,
ccpaDoNotSell: false,
isChildDirected: false,
isUnderAgeOfConsent: false,
attGranted: true);2. Anti-Cheat
Subscribe to Anti-Cheat events BEFORE calling Initialise: CiaoSDKAntiCheat.OnSuspiciousActivityDetected
CiaoSDKAntiCheat.OnSuspiciousActivityDetected += args =>
CiaoSDK.SendCheaterDetected(args);3. Initialise CiaoSDK
Initialise CiaoSDK in your bootstrap (first) scene: CiaoSDK.Initialize
CiaoSDK.Initialize(consent);4. Report Level Completed
When user completes a level, report it: CiaoSDK.SendLevelCompleted
Pay attention to ltv reporting
CiaoSDK.SendLevelCompleted(new LevelCompletedArgs {
level = 1,
time = 45,
session = 1,
ltv = 0.0f
});5. Report IAP Purchase
When user makes a successful and valid IAP, report it: CiaoSDK.SendIAPPurchased
// Report an IAP (Unity IAP v5).
CiaoSDK.SendIAPPurchased(new IAPArgs(order, false));
// Report an IAP (Unity IAP v4).
CiaoSDK.SendIAPPurchased(new IAPArgs(args.purchasedProduct, false));6. Report a cheater
If you get a signal from Anti-Cheat for suspicious behaviour and you evaluate as a cheat, report it: CiaoSDK.SendCheaterDetected
CiaoSDK.SendCheaterDetected(cheatArgs);7. Show an Ad
Show Ads: CiaoSDKAds.ShowRewarded etc..
// Interstitial and Rewarded ads are auto-loaded.
// Ad Revenue is auto-reported — you do not need to report it manually.
CiaoSDKAds.ShowRewarded("reviveOnDeath", success => {
if (success) GrantReward();
});8. Ad Revenue
Ad Revenue: this is reported automatically by CiaoSDK
9. Custom Events
CiaoSDK supports custom events to both Singular and ByteBrew.
// Custom event with no parameters (THIS IS NOT IAP REPORT REVENUE, you can send it as extra event to your IAP report)
CiaoSDK.SendEvent("iap_smallpack");
// With parameters (THIS IS NOT IAP REPORT REVENUE, you can send it as extra event to your IAP report):
CiaoSDK.SendEvent("iap_smallpack", new Dictionary<string, string>
{
{ "price", "2.99" },
{ "currency", "USD" },
{ "productId", "com.mystudio.mygame.smallpack" }
});
// Random step example:
CiaoSDK.SendEvent("step_completed", new Dictionary<string, string>
{
{ "step", "5" },
{ "time", "42" }
});Key Points
- Call
CiaoSDK.Initialize(consent)once in your bootstrap scene. - Subscribe to events (Anti-Cheat, Ads) before calling
Initialize. - Ad Revenue is auto-reported to MMP and Analytics - you never need to send it manually.
- Interstitial and Rewarded ads are auto-loaded - just check
IsInterstitialReady/IsRewardedReadybefore showing.
Updated 20 days ago
