Table of Contents

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

bool

IsSubscriber

Whether the user has ever subscribed or is currently under a subscription

public static bool IsSubscriber { get; }

Property Value

bool

Methods

GetBannerAbpForImpressions(int)

Returns the average bid price for the last N impressions.

public static double GetBannerAbpForImpressions(int impressionsCount)

Parameters

impressionsCount int

Number 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

impressionsCount int

Number 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

impressionsCount int

Number 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

days int

Returns

double

TrackPurchase()

Tracks a completed purchase and updates user status

public static Task TrackPurchase()

Returns

Task

TrackSubscription()

Tracks a subscription purchase and updates user status

public static Task TrackSubscription()

Returns

Task

Events

AdRevenueTracked

Event triggered when ad revenue is tracked.

public static event Action AdRevenueTracked

Event Type

Action

PurchaseTracked

Event triggered when a purchase is tracked.

public static event Action PurchaseTracked

Event Type

Action

SubscriptionTracked

Event triggered when a subscription is tracked.

public static event Action SubscriptionTracked

Event Type

Action