public class CBAnalytics
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CBAnalytics.CBCustomEventType
Enum values for Custom event type
|
static class |
CBAnalytics.CBIAPPurchaseInfo
CBIAPPurchaseInfo provides a list of enum constants which is used as a key in sending out
purchase information for a product during the In-app Purchase and to perform Post Install Analytics tracking.
|
static class |
CBAnalytics.CBIAPType
Types of In-App Purchase supported
|
static class |
CBAnalytics.CBLevelType
Different type of level tracking information values
|
static class |
CBAnalytics.CBMiscRevenueGeneratingEventType
Enum values for RevenueGeneratingEventType
|
Modifier and Type | Method and Description |
---|---|
static void |
trackInAppAmazonStorePurchaseEvent(java.lang.String title,
java.lang.String description,
java.lang.String price,
java.lang.String currency,
java.lang.String productID,
java.lang.String userID,
java.lang.String purchaseToken)
Call this method to track in-app purchase made at AmazonPlay store.
|
static void |
trackInAppGooglePlayPurchaseEvent(java.lang.String title,
java.lang.String description,
java.lang.String price,
java.lang.String currency,
java.lang.String productID,
java.lang.String purchaseData,
java.lang.String purchaseSignature)
Call this method to track in-app purchase made at GooglePlay store.
|
void |
trackInAppPurchaseEvent(java.util.EnumMap<CBAnalytics.CBIAPPurchaseInfo,java.lang.String> map,
CBAnalytics.CBIAPType iapType)
Track an In App Purchase Event.
|
static void |
trackLevelInfo(java.lang.String eventLabel,
CBAnalytics.CBLevelType type,
int mainLevel,
int subLevel,
java.lang.String description)
Method used to send current level information details on the game played.
|
static void |
trackLevelInfo(java.lang.String eventLabel,
CBAnalytics.CBLevelType type,
int mainLevel,
java.lang.String description)
Method used to send current level information details on the game played.
|
public void trackInAppPurchaseEvent(java.util.EnumMap<CBAnalytics.CBIAPPurchaseInfo,java.lang.String> map, CBAnalytics.CBIAPType iapType)
map
- enum hash map where 'KEY' is CBAnalytics.CBIAPPurchaseInfo
and value is the purchase information of the product.iapType
- It's mandatory, you need to send the type of in-app purchase being used from the enum value.
EnumMap<CBIAPPurchaseInfo, Object> map = new EnumMap<CBIAPPurchaseInfo, Object>(CBIAPPurchaseInfo.class);
map.put(CBIAPPurchaseInfo.PRODUCT_ID, "Provide product id from the purchase made");
map.put(CBIAPPurchaseInfo.PRODUCT_TITLE, "Provide product tile from the purchase made");
map.put(CBIAPPurchaseInfo.PRODUCT_DESCRIPTION, "Provide product desc from the purchase made");
map.put(CBIAPPurchaseInfo.PRODUCT_PRICE, "Provide product price from the purchase made");
map.put(CBIAPPurchaseInfo.PRODUCT_CURRENCY_CODE, "Provide currency code of the purchase");
map.put(CBIAPPurchaseInfo.GOOGLE_PURCHASE_DATA, "Provide purchaseData object of the purchase");
map.put(CBIAPPurchaseInfo.GOOGLE_PURCHASE_SIGNATURE, "Provide purchaseSignature of the purchase");
EnumMap<CBIAPPurchaseInfo, Object> map = new EnumMap<CBIAPPurchaseInfo, Object>(CBIAPPurchaseInfo.class);
map.put(CBIAPPurchaseInfo.PRODUCT_ID, "Provide product id from the purchase made");
map.put(CBIAPPurchaseInfo.PRODUCT_TITLE, "Provide product tile from the purchase made");
map.put(CBIAPPurchaseInfo.PRODUCT_DESCRIPTION, "Provide product desc from the purchase made");
map.put(CBIAPPurchaseInfo.PRODUCT_PRICE, "Provide product price from the purchase made");
map.put(CBIAPPurchaseInfo.PRODUCT_CURRENCY_CODE, "Provide currency code of the purchase");
map.put(CBIAPPurchaseInfo.AMAZON_USER_ID, "Provide amazon user id of the purchase");
map.put(CBIAPPurchaseInfo.AMAZON_PURCHASE_TOKEN, "Provide purchaseToken from the receipt of the purchase");
public static void trackInAppGooglePlayPurchaseEvent(java.lang.String title, java.lang.String description, java.lang.String price, java.lang.String currency, java.lang.String productID, java.lang.String purchaseData, java.lang.String purchaseSignature)
All paramters are mandatory so it cannot be empty or null
title
- Title of the product being purchased. (Eg: Sword)description
- Description of the product being purchased (Eg: Platinum sword)price
- Cost of the product being purchased. (Eg: "$0.99")currency
- Currency in which the product was purchased (Eg: USD)productID
- Unique productID being purchased. (Eg:com.chartboost.sword)purchaseData
- Unique string which you get from Google Play when a product is purchased.purchaseSignature
- Unique string which you get from google play when a product is purchased.public static void trackInAppAmazonStorePurchaseEvent(java.lang.String title, java.lang.String description, java.lang.String price, java.lang.String currency, java.lang.String productID, java.lang.String userID, java.lang.String purchaseToken)
All paramters are mandatory so it cannot be empty or null
title
- Title of the product being purchased. (Eg: Sword)description
- Description of the product being purchased (Eg: Platinum sword)price
- of the product being purchased. (Eg: "0.99")currency
- Currency in which the product was purchased (Eg: USD)productID
- Unique productID being purchased. (Eg:com.chartboost.sword)userID
- Userd ID used in purchasing the product.purchaseToken
- Unique string which you get from Amazon Store when a product is purchased.public static void trackLevelInfo(java.lang.String eventLabel, CBAnalytics.CBLevelType type, int mainLevel, java.lang.String description)
eventLabel
- Event label for the level informationtype
- Type of levelmainLevel
- Level number for the current level
* @param mainLevel Level number for the current leveldescription
- Description about the level informationpublic static void trackLevelInfo(java.lang.String eventLabel, CBAnalytics.CBLevelType type, int mainLevel, int subLevel, java.lang.String description)
eventLabel
- Event label for the level informationtype
- Type of levelmainLevel
- Level number for the current levelsubLevel
- Current sub-level numberdescription
- Description about the level information