Upsight logo Back to top

Content Units

Content Unit Overview


All content units must be configured from the Upsight Marketing Dashboard. Once configured, you must make a content request from your app for a specific placement that contains the content unit you wish to display.

Some content units described below require additional coding in order to fully support.

Announcements


Announcements are messages delivered to players in your app. See Help Center overview for more information.

No additional code is required to support this content unit.

Internal Cross-Promotions


Internal Cross-Promotions are customizable promotions for your own apps. See Help Center overview for more information.

No additional code is required to support this content unit.

More Games Widget


The More Games Widget is a non-interruptive content unit in your app featuring a list of app titles. Apps typically have a dedicated button in the main menu to request this content unit. See Help Center overview for more information.

No additional code is required to support a basic More Games Widget, but advanced functionality is available with additional coding.

The More Games Widget supports a notification badge count that can be used to visually indicate that there are new apps. Displaying this notification badge count on top of your More Games button can increase clicks. The following code shows how to get the notification badge count.

// Listen for the notification badge count event.
UpsightManager.badgeCountRequestSucceededEvent += myShowNotificationBadgeCountMethod;

// Get the notification badge count for the placement “more_games”.
// This placement must have a More Games Widget associated with it!
Upsight.getContentBadgeNumber( "more_games" );

The notification badge count will be passed to your custom method when the event fires.

void myShowNotificationBadgeCountMethod( int badgeCount )
{
    // Draw a notification badge on top of your More Games button
    // using the badgeCount
}

Opt-In Data Collection


Opt-in Data Collection is a promotion that gives users the option to provide you with valuable information like email address, name, and age. See Help Center overview for more information.

No additional code is required to support this content unit.

Rewards


Rewards are customized offers automatically awarded to your users. See Help Center overview for more information.

Additional coding is required to support rewards. After a reward content unit is displayed, the unlockedRewardEvent is fired for each reward item that you have configured for the content unit in the Upsight Marketing Dashboard. The unlockedRewardEvent can also be triggered by other content units, like Opt-In Data Collection.

// Listen for the unlocked reward event.
UpsightManager.unlockedRewardEvent += myUnlockedRewardMethod;

When a reward is unlocked, an UpsightReward will be passed to your custom method. Use this to give the reward to the user.

void myUnlockedRewardMethod( UpsightReward reward )
{
    // Give the user the UpsightReward that was unlocked
    //
    // reward.name - The name of your reward configured in the dashboard
    // reward.quantity - Integer quantity of the reward configured in the dashboard
    // reward.receipt - Unique identifier to detect duplicate reward unlocks. Your
    //                  app should ensure that each receipt is only unlocked once.
}

Virtual Goods Promotion (VGP)


A Virtual Goods Promotion (VGP) is a customizable promotion used to increase in-app purchases. See Help Center overview for more information.

Additional coding is required to support VGPs. When a user clicks on a VGP content unit, the makePurchaseEvent is fired.

// Listen for the purchase event.
UpsightManager.makePurchaseEvent += myMakePurchaseMethod;

When the makePurchaseEvent fires, an UpsightPurchase will be passed to your custom method. Use this to initiate in-app purchases from your app. After the purchase completes, use trackInAppPurchase to track any purchase conversions. On Android, use the trackInAppPurchase( quantity, UpsightAndroidPurchaseResolution , price, sku, store, UpsightPurchase); to track conversions.

void myMakePurchaseMethod( UpsightPurchase purchase )
{ // Initiate an In-App Purchase for this item 
  // 
  // purchase.productIdentifier - The IAP product identifier / SKU 
  // purchase.quantity - Integer quantity of the purchase .... 
  // record the purchase 
#if UNITY_ANDROID 
Upsight.trackInAppPurchase( quantity, UpsightAndroidPurchaseResolution.Bought, price, orderId, store, purchase) 
#elif UNITY_IOS 
Upsight.trackInAppPurchase( productId, quantity, UpsightIosPurchaseResolution.Buy, receipt); 
#endif }