Class PlayerMonetizationProfile
- Namespace
- HomaGames.HomaBelly
- Assembly
- HomaGames.HomaBelly.Core.dll
Centralized provider for user monetization metrics.
public static class PlayerMonetizationProfile
- Inheritance
-
PlayerMonetizationProfile
- Inherited Members
Remarks
Wait for HomaGames.HomaBelly.HomaBelly.IsInitialized before using this API.
Properties
IsPurchaser
Whether the user has made any purchase
public static bool IsPurchaser { get; }
Property Value
IsSubscriber
Whether the user has ever subscribed or is currently under a subscription
public static bool IsSubscriber { get; }
Property Value
Methods
GetBannerAbpForImpressions(int)
Returns the average bid price for the last N impressions.
public static double GetBannerAbpForImpressions(int impressionsCount)
Parameters
impressionsCountintNumber of impressions, must be between 1 and 50.
Returns
- double
Average bid price or 0.
Remarks
For banner impressions.
GetInterstitialAbpForImpressions(int)
Returns the average bid price for the last N impressions.
public static double GetInterstitialAbpForImpressions(int impressionsCount)
Parameters
impressionsCountintNumber of impressions, must be between 1 and 50.
Returns
- double
Average bid price or 0.
Remarks
For interstitial impressions.
GetRewardedVideoAbpForImpressions(int)
Returns the average bid price for the last N impressions.
public static double GetRewardedVideoAbpForImpressions(int impressionsCount)
Parameters
impressionsCountintNumber of impressions, must be between 1 and 50.
Returns
- double
Average bid price or 0.
Remarks
For rewarded video impressions.
GetRollingLtvForDays(int)
Returns the LTV for a rolling window that always includes today (unfinished day) Example: days = 0 -> D0 (today), days = 1 -> D1 (today+yesterday)
public static double GetRollingLtvForDays(int days)
Parameters
daysint
Returns
TrackPurchase()
Tracks a completed purchase and updates user status
public static Task TrackPurchase()
Returns
TrackSubscription()
Tracks a subscription purchase and updates user status
public static Task TrackSubscription()
Returns
Events
AdRevenueTracked
Event triggered when ad revenue is tracked.
public static event Action AdRevenueTracked
Event Type
PurchaseTracked
Event triggered when a purchase is tracked.
public static event Action PurchaseTracked
Event Type
SubscriptionTracked
Event triggered when a subscription is tracked.
public static event Action SubscriptionTracked