Kongregate Mobile Unity API
|
This interface wraps the functionality provided by the Adjust and Swrve SDKs. More...
Public Member Functions | |
void | LoadKongregateJavascriptAPI () |
Loads the Kongregate Javascript API Internal method for WebGL to function. | |
void | InitAutomaticProperties () |
Update the automatic properties in JS API Internal method for WebGL to function. | |
void | SetCommonPropsCallback (delegateGetCommonProperties callback) |
Set the common properties callback. More... | |
void | SetCommonProperties (string jsonString) |
Sets the common properties from a string representation of a JSON object. | |
void | SetCommonProperties (Dictionary< string, object > props) |
Sets the common properties from a dictionary. More... | |
void | UpdateCommonProps () |
Manually run the common properties delegate to update the properties. More... | |
void | GameUserUpdate (Dictionary< string, object > props) |
Update Game User Properties. More... | |
void | GameUserUpdate (string propsJson) |
Update Game User Properties. More... | |
void | AddEvent (string collection, Dictionary< string, object > evt) |
Add the event to Analytics. More... | |
void | AddEvent (string collection, string jsonMap) |
Add event to Analytics using a JSON String. | |
void | SetSwrveButtonListener (string gameObjectName, string functionName) |
Sets the callback listener for Swrve in-app messages (http://docs.swrve.com/user-documentation/in-app-messaging/). More... | |
void | SetDeltaButtonListener (Analytics.ButtonActionListener listener) |
Sets the callback listener for Delta in-app messages Will be invoked when a deep link is selected as the message Action. More... | |
void | SetDeltaParameterListener (Analytics.ParameterListener listener) |
Sets the callback listener for Delta event recording. More... | |
void | SetAutoEventListener (GameObject gameObject, KongregateAPI.EventDelegate listener) |
Sets a listener for analytic events the Kongregate SDK automatically fires. More... | |
void | SetPushToken (string token) |
Notifies adjust the device token for iOS and firebase push token for Android. More... | |
void | SetFilterType (string filterType) |
Deprecated. More... | |
void | AddFilterType (string filterType) |
Adds a filter type to the filter list. More... | |
void | TrackPurchase (string productID, int quantity) |
Deprecated. More... | |
string | GetInstallReferrer () |
Get the install referrer on Android, if set. More... | |
string | GetAutoPropertiesJSON () |
Get a JSON string for all automatic properties. More... | |
long | GetAutoLongProperty (string field) |
Get a long automatic property. More... | |
string | GetAutoStringProperty (string field) |
Get a string automatic property. More... | |
bool | GetAutoBoolProperty (string field) |
Get a boolean automatic property. More... | |
double | GetAutoDoubleProperty (string field) |
Get a double automatic property. More... | |
int | GetAutoIntProperty (string field) |
Get an integer automatic property. More... | |
string | GetAutoUTCProperty (string field) |
Get a UTC timestamp string automatic property. More... | |
void | StartPurchase (string productID, int quantity, Dictionary< string, object > gameFields) |
Creates an Adjust/Swrve iap_attemps event. More... | |
void | StartPurchase (string productID, int quantity, string gameFieldsJson) |
Creates an Adjust/Swrve iap_attemps event. More... | |
void | FinishPurchase (string resultCode, string transactionId, Dictionary< string, object > gameFields) |
Finish a purchase that was started with StartPurchase(). More... | |
void | FinishPurchase (string resultCode, string transactionId, string gameFieldsJson) |
Finish a purchase that was started with StartPurchase(). More... | |
void | FinishPurchaseWithProductId (string resultCode, string productID, string receipt, string gameFieldsJson) |
iOS Only. More... | |
void | FinishPurchaseWithProductId (string resultCode, string productID, string receipt, Dictionary< string, object > gameFields) |
iOS Only Finish a purchase that was started with StartPurchase(). More... | |
void | FinishPurchase (string resultCode, string transactionId, Dictionary< string, object > gameFields, string dataSignature) |
Finish a purchase that was started with StartPurchase(). More... | |
void | FinishPurchase (string resultCode, string transactionId, string gameFieldsJson, string dataSignature) |
Finish a purchase that was started with StartPurchase(). More... | |
void | AddGoogleIapTransaction (double revenueUSD, string receiptOriginalJSON, string receiptSignature, string gameFieldsJson) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for a Google Purchase. More... | |
void | AddGoogleIapTransaction (double revenueUSD, string receiptOriginalJSON, string receiptSignature, Dictionary< string, object > gameFields) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for a Google Purchase. More... | |
void | AddGoogleIapTransactionWithCurrency (double revenue, string currency, string receiptOriginalJSON, string receiptSignature, string gameFieldsJson) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for a Google Purchase. More... | |
void | AddGoogleIapTransactionWithCurrency (double revenue, string currency, string receiptOriginalJSON, string receiptSignature, Dictionary< string, object > gameFields) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for a Google Purchase. More... | |
void | AddIOSIapTransaction (double revenueUSD, string transactionId, string gameFieldsJson) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for an iOS Purchase. More... | |
void | AddIOSIapTransaction (double revenue, string transactionId, Dictionary< string, object > gameFields) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for an iOS Purchase. More... | |
void | AddIOSIapTransactionWithCurrency (double revenue, string currency, string transactionId, string gameFieldsJson) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for an iOS Purchase. More... | |
void | AddIOSIapTransactionWithCurrency (double revenue, string currency, string transactionId, Dictionary< string, object > gameFields) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for an iOS Purchase. More... | |
void | AddSimpleIapTransaction (double revenue, string currency, string productId, string gameFieldsJson) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for an iOS or Google Purchase. More... | |
void | AddSimpleIapTransaction (double revenue, string currency, string productId, Dictionary< string, object > gameFields) |
Add a Kongregate Analytics iap_transaction event and Adjust sale event for an iOS or Google Purchase. More... | |
string | GetResourceNames () |
Retrieve the set of Swrve resource names. More... | |
string | GetResourceAsString (string resourceId, string attributeId, string defValue) |
Retrieve a Swrve A/B test resource as a string. More... | |
int | GetResourceAsInt (string resourceId, string attributeId, int defValue) |
Retrieve a Swrve A/B test resource as an int. More... | |
float | GetResourceAsFloat (string resourceId, string attributeId, float defValue) |
Retrieve a Swrve A/B test resource as a float. More... | |
bool | GetResourceAsBool (string resourceId, string attributeId, bool defValue) |
Retrieve a Swrve A/B test resource as a bool. More... | |
void | FinishPromoAward (string promoId) |
Notify the SDK that the promo with the associated ID has been awarded. More... | |
void | TrackPurchase (string productID, int quantity, Dictionary< string, object > fields) |
Deprecated. More... | |
void | Start () |
When using KongregateSettings.DeferAnalytics, this allows you to start the analytics subsystem. More... | |
void | StartDeltaDNA () |
Internal method to start Unity DeltaDNA analytics separately. More... | |
This interface wraps the functionality provided by the Adjust and Swrve SDKs.
It also includeds legacy support for Keen. Ad-X has been removed from the Kongregate SDK.
The primary purpose of this interface is to expose hooks for games to pass events to Swrve and Adjust. It also provides wrappers for some additional Swrve features such as User Properties, A/B Testing, and Push Notifications. See the Mobile SDK Docs for details of the various features.
void Kongregate.IAnalytics.AddEvent | ( | string | collection, |
Dictionary< string, object > | evt | ||
) |
Add the event to Analytics.
The key must be less than 256 characters, not start with '$' or contain '.'
The Dictionary<string,object>
may include a list of keys mapped to Number
, String
, Array
, or Boolean
. Other values types will not be submitted as events.
void Kongregate.IAnalytics.AddFilterType | ( | string | filterType | ) |
Adds a filter type to the filter list.
filterType | the filter to add |
void Kongregate.IAnalytics.AddGoogleIapTransaction | ( | double | revenueUSD, |
string | receiptOriginalJSON, | ||
string | receiptSignature, | ||
string | gameFieldsJson | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for a Google Purchase.
SEE: KongAnalyticsOnlyDemo.cs for example usage
This is the preferred method to use when the purchased product does not conform to the TXX_description
naming convention. It is preferred because the revenue is explicitly provided in USD where we are unable to infer the USD cost from the ID. By including the original receipt and signature we can extract additional information about the purchase and validate the receipt.
This should be invoked after the purchase is complete and the receipt verified.
revenueUSD | the purchase price of the item in US Dollars |
receiptOrigialJSON | the original JSON receipt returned by the Google Play Store |
receiptSignature | the signature returned by the Google Play Store |
gameFieldsJson | JSON formated object of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddGoogleIapTransaction | ( | double | revenueUSD, |
string | receiptOriginalJSON, | ||
string | receiptSignature, | ||
Dictionary< string, object > | gameFields | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for a Google Purchase.
SEE: KongAnalyticsOnlyDemo.cs for example usage
This is the preferred method to use when the purchased product does not conform to the TXX_description
naming convention. It is preferred because the revenue is explicitly provided in USD where we are unable to infer the USD cost from the ID. By including the original receipt and signature we can extract additional information about the purchase and validate the receipt.
This should be invoked after the purchase is complete and the receipt verified.
revenueUSD | the purchase price of the item in US Dollars |
receiptOrigialJSON | the original JSON receipt returned by the Google Play Store |
receiptSignature | the signature returned by the Google Play Store |
gameFields | Dictionary of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddGoogleIapTransactionWithCurrency | ( | double | revenue, |
string | currency, | ||
string | receiptOriginalJSON, | ||
string | receiptSignature, | ||
string | gameFieldsJson | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for a Google Purchase.
AddGoogleIapTransaction()
is the preferred method to use since it allows revenue to be normalized to USD. This method may be used when the USD price is unknown. Adjust does convert the revenue to USD in it's sale event, however Kongregate Analytics will not.
This should be invoked after the purchase is complete and the receipt verified.
revenue | the purchase price of the item in the given currency |
currency | the currency code the revenue is reported in. |
receiptOrigialJSON | the original JSON receipt returned by the Google Play Store |
receiptSignature | the signature returned by the Google Play Store |
gameFieldsJson | JSON formated object of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddGoogleIapTransactionWithCurrency | ( | double | revenue, |
string | currency, | ||
string | receiptOriginalJSON, | ||
string | receiptSignature, | ||
Dictionary< string, object > | gameFields | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for a Google Purchase.
AddGoogleIapTransaction()
is the preferred method to use since it allows revenue to be normalized to USD. This method may be used when the USD price is unknown. Adjust does convert the revenue to USD in it's sale event, however Kongregate Analytics will not.
This should be invoked after the purchase is complete and the receipt verified.
revenue | the purchase price of the item in the given currency |
currency | the currency code the revenue is reported in. |
receiptOrigialJSON | the original JSON receipt returned by the Google Play Store |
receiptSignature | the signature returned by the Google Play Store |
gameFields | Dictionary of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddIOSIapTransaction | ( | double | revenueUSD, |
string | transactionId, | ||
string | gameFieldsJson | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for an iOS Purchase.
SEE: KongAnalyticsOnlyDemo.cs for example usage
This is the preferred method to use when the purchased product does not conform to the TXX_description
naming convention. It is preferred because the revenue is explicitly provided in USD where we are unable to infer the USD cost from the ID. By including the iOS transaction ID we can extract additional information about the purchase.
This should be invoked after the purchase is complete and the receipt verified but before the transaction is consumed. Once a transaction is consumed the SDK can no longer extract information from the payment queue.
revenueUSD | the purchase price of the item in US Dollars |
transactionId | the iOS transaction ID for the purchase |
gameFieldsJson | JSON formated object of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddIOSIapTransaction | ( | double | revenue, |
string | transactionId, | ||
Dictionary< string, object > | gameFields | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for an iOS Purchase.
SEE: KongAnalyticsOnlyDemo.cs for example usage
This is the preferred method to use when the purchased product does not conform to the TXX_description
naming convention. It is preferred because the revenue is explicitly provided in USD where we are unable to infer the USD cost from the ID. By including the iOS transaction ID we can extract additional information about the purchase.
This should be invoked after the purchase is complete and the receipt verified but before the transaction is consumed. Once a transaction is consumed the SDK can no longer extract information from the payment queue.
revenueUSD | the purchase price of the item in US Dollars |
transactionId | the iOS transaction ID for the purchase |
gameFields | Dictionary of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddIOSIapTransactionWithCurrency | ( | double | revenue, |
string | currency, | ||
string | transactionId, | ||
string | gameFieldsJson | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for an iOS Purchase.
AddIOSIapTransaction()
is the preferred method to use since it allows revenue to be normalized to USD. However, this method may be used when the USD price is unknown. Adjust does convert the revenue to USD, however Kongregate Analytics will not.
This should be invoked after the purchase is complete and the receipt verified but before the transaction is consumed. Once a transaction is consumed the SDK can no longer extract information from the payment queue.
revenue | the purchase price of the item in the given currency |
currency | the currency code the revenue is reported in. |
transactionId | the iOS transaction ID for the purchase |
gameFieldsJson | JSON formated object of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddIOSIapTransactionWithCurrency | ( | double | revenue, |
string | currency, | ||
string | transactionId, | ||
Dictionary< string, object > | gameFields | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for an iOS Purchase.
AddIOSIapTransaction()
is the preferred method to use since it allows revenue to be normalized to USD. However, this method may be used when the USD price is unknown. Adjust does convert the revenue to USD, however Kongregate Analytics will not.
This should be invoked after the purchase is complete and the receipt verified but before the transaction is consumed. Once a transaction is consumed the SDK can no longer extract information from the payment queue.
revenue | the purchase price of the item in the given currency |
currency | the currency code the revenue is reported in. |
transactionId | the iOS transaction ID for the purchase |
gameFields | Dictionary of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddSimpleIapTransaction | ( | double | revenue, |
string | currency, | ||
string | productId, | ||
string | gameFieldsJson | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for an iOS or Google Purchase.
AddIOSIapTransaction()
and AddGoogleIapTransaction()
are the preferred methods. This one may be used when the Google receipt or iOS transaction is not available.
This should be invoked of the purchase is complete and the receipt has been verified.
revenue | the purchase price of the item in the given currency |
currency | the currency code the revenue is reported in. |
productId | the identifier for the purchased product |
gameFieldsJson | JSON formated object of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.AddSimpleIapTransaction | ( | double | revenue, |
string | currency, | ||
string | productId, | ||
Dictionary< string, object > | gameFields | ||
) |
Add a Kongregate Analytics iap_transaction
event and Adjust sale
event for an iOS or Google Purchase.
AddIOSIapTransaction()
and AddGoogleIapTransaction()
are the preferred methods. This one may be used when the Google receipt or iOS transaction is not available.
revenue | the purchase price of the item in the given currency |
currency | the currency code the revenue is reported in. |
productId | the identifier for the purchased product |
gameFields | Dictionary of additional fields to include with the event (e.g. soft_currency_change ) |
void Kongregate.IAnalytics.FinishPromoAward | ( | string | promoId | ) |
Notify the SDK that the promo with the associated ID has been awarded.
This will update a Swrve User Property that will prevent the SDK from sending another in-app message for the Award.
It's a good idea, particularly if your game has a server component, to also track awarded promoIds and to display a message if your game is asked to award a promo that has already been awarded. This will handle an edge case where a user can trick the client into showing the in-app message to perform the award again.
promoId | the promoId associated with the award |
void Kongregate.IAnalytics.FinishPurchase | ( | string | resultCode, |
string | transactionId, | ||
Dictionary< string, object > | gameFields | ||
) |
Finish a purchase that was started with StartPurchase().
The method will create either iap_transactions
or iap_fails
purchase events depending on resultCode and state of the resultData. Will also fire Adjust and Swrve IAP events upon success.
Invoke this after the purchase is complete and the receipt verified (if using Receipt Verification). For iOS be sure to invoke before [SKPaymentQueue finishTransaction:]
, as the transactionId must still exist in the SKPaymentQueue to extract the required information.
resultCode | one of SUCCESS, FAIL, RECEIPT_FAIL |
transactionId | value of this parameter is different for iOS and Android.
|
gameFields | dictionary values to pass along with the event (e.g. hard_currency_changed , soft_currency_changed , etc.) |
void Kongregate.IAnalytics.FinishPurchase | ( | string | resultCode, |
string | transactionId, | ||
string | gameFieldsJson | ||
) |
Finish a purchase that was started with StartPurchase().
The method will create either iap_transactions
or iap_fails
purchase events depending on resultCode and state of the resultData. Will also fire Adjust and Swrve IAP events upon success.
Invoke this after the purchase is complete and the receipt verified (if using Receipt Verification). For iOS be sure to invoke before [SKPaymentQueue finishTransaction:]
, as the transactionId must still exist in the SKPaymentQueue to extract the required information.
resultCode | one of SUCCESS, FAIL, RECEIPT_FAIL |
transactionId | value of this parameter is different for iOS and Android.
|
gameFieldsJson | json string with values to pass along with the event (e.g. hard_currency_changed , soft_currency_changed , etc.) |
void Kongregate.IAnalytics.FinishPurchase | ( | string | resultCode, |
string | transactionId, | ||
Dictionary< string, object > | gameFields, | ||
string | dataSignature | ||
) |
Finish a purchase that was started with StartPurchase().
The method will create either iap_transactions
or iap_fails
purchase events depending on resultCode and state of the resultData. Will also fire Adjust nd Swrve IAP events upon success.
Invoke this after the purchase is complete and the receipt verified (if using Receipt Verification). For iOS be sure to invoke before [SKPaymentQueue finishTransaction:]
, as the transactionId must still exist in the SKPaymentQueue to extract the required information.
resultCode | one of SUCCESS, FAIL, RECEIPT_FAIL |
transactionId | value of this parameter is different for iOS and Android.
|
gameFields | dictionary values to pass along with the event (e.g. hard_currency_changed , soft_currency_changed , etc.) |
dataSignature | the signature used to sign result data. Used by SWRVE analytics to verify the purchase (Android Only). Ignored on iOS. If nil on Android, Swrve will no validate the receipt. |
void Kongregate.IAnalytics.FinishPurchase | ( | string | resultCode, |
string | transactionId, | ||
string | gameFieldsJson, | ||
string | dataSignature | ||
) |
Finish a purchase that was started with StartPurchase().
The method will create either iap_transactions
or iap_fails
purchase events depending on resultCode and state of the resultData. Will also fire Adjust and Swrve IAP events upon success.
Invoke this after the purchase is complete and the receipt verified (if using Receipt Verification). For iOS be sure to invoke before [SKPaymentQueue finishTransaction:]
, as the transactionId must still exist in the SKPaymentQueue to extract the required information.
resultCode | one of SUCCESS, FAIL, RECEIPT_FAIL |
transactionId | value of this parameter is different for iOS and Android.
|
gameFieldsJson | json string with values to pass along with the event (e.g. hard_currency_changed , soft_currency_changed , etc.) |
dataSignature | the signature used to sign result data. Used by SWRVE analytics to verify the purchase (Android Only). Ignored on iOS. If nil on Android, Swrve will no validate the receipt. |
void Kongregate.IAnalytics.FinishPurchaseWithProductId | ( | string | resultCode, |
string | productID, | ||
string | receipt, | ||
string | gameFieldsJson | ||
) |
iOS Only.
Finish a purchase that was started with StartPurchase(). Will result in either an iap_fails or iap_transactions event. Use this version for iOS only, if you have a Product ID and receipt, but not the transaction ID. The other FinishPurchase() methods are preferrable, because transaction information may be pulled directly from the transaction.
resultCode | one of PURCHASE_FAIL, PURCHASE_SUCCESS, PURCHASE_RECEIPT_FAIL |
productID | the product of the item purchased. |
receipt | the receipt data base64 encoded |
gameFieldsJson | json string of fields to send up with the event. |
void Kongregate.IAnalytics.FinishPurchaseWithProductId | ( | string | resultCode, |
string | productID, | ||
string | receipt, | ||
Dictionary< string, object > | gameFields | ||
) |
iOS Only Finish a purchase that was started with StartPurchase().
Will result in either an iap_fails or iap_transactions event. Use this version for iOS only, if you have a Product ID and receipt, but not the transaction ID. The other FinishPurchase() methods are preferrable, because transaction information may be pulled directly from the transaction.
resultCode | one of PURCHASE_FAIL, PURCHASE_SUCCESS, PURCHASE_RECEIPT_FAIL |
productID | the product of the item purchased. |
receipt | the receipt data base64 encoded |
gameFields | dictionary game fields to send up with the event. |
void Kongregate.IAnalytics.GameUserUpdate | ( | Dictionary< string, object > | props | ) |
Update Game User Properties.
If Swrve is enabled, these will be passed to the Swrve SDK. All values must be strings.
void Kongregate.IAnalytics.GameUserUpdate | ( | string | propsJson | ) |
Update Game User Properties.
Values must be Strings. If Swrve is enabled, these will be passed to the Swrve SDK.
bool Kongregate.IAnalytics.GetAutoBoolProperty | ( | string | field | ) |
Get a boolean automatic property.
field | The field name |
double Kongregate.IAnalytics.GetAutoDoubleProperty | ( | string | field | ) |
Get a double automatic property.
field | The field name |
int Kongregate.IAnalytics.GetAutoIntProperty | ( | string | field | ) |
Get an integer automatic property.
field | The field name |
long Kongregate.IAnalytics.GetAutoLongProperty | ( | string | field | ) |
Get a long automatic property.
field | The field name |
string Kongregate.IAnalytics.GetAutoPropertiesJSON | ( | ) |
Get a JSON string for all automatic properties.
string Kongregate.IAnalytics.GetAutoStringProperty | ( | string | field | ) |
Get a string automatic property.
field | The field name |
string Kongregate.IAnalytics.GetAutoUTCProperty | ( | string | field | ) |
Get a UTC timestamp string automatic property.
field | The field name |
string Kongregate.IAnalytics.GetInstallReferrer | ( | ) |
Get the install referrer on Android, if set.
Otherwise, returns an empty string.
bool Kongregate.IAnalytics.GetResourceAsBool | ( | string | resourceId, |
string | attributeId, | ||
bool | defValue | ||
) |
Retrieve a Swrve A/B test resource as a bool.
resourceId | the ID of the Swrve resource |
attributeId | the ID of the attribute |
defValue | a devault value if the resource/attribute is not found. |
float Kongregate.IAnalytics.GetResourceAsFloat | ( | string | resourceId, |
string | attributeId, | ||
float | defValue | ||
) |
Retrieve a Swrve A/B test resource as a float.
resourceId | the ID of the Swrve resource |
attributeId | the ID of the attribute |
defValue | a devault value if the resource/attribute is not found. |
int Kongregate.IAnalytics.GetResourceAsInt | ( | string | resourceId, |
string | attributeId, | ||
int | defValue | ||
) |
Retrieve a Swrve A/B test resource as an int.
resourceId | the ID of the Swrve resource |
attributeId | the ID of the attribute |
defValue | a devault value if the resource/attribute is not found. |
string Kongregate.IAnalytics.GetResourceAsString | ( | string | resourceId, |
string | attributeId, | ||
string | defValue | ||
) |
Retrieve a Swrve A/B test resource as a string.
resourceId | the ID of the Swrve resource |
attributeId | the ID of the attribute |
defValue | a devault value if the resource/attribute is not found. |
string Kongregate.IAnalytics.GetResourceNames | ( | ) |
Retrieve the set of Swrve resource names.
void Kongregate.IAnalytics.SetAutoEventListener | ( | GameObject | gameObject, |
KongregateAPI.EventDelegate | listener | ||
) |
Sets a listener for analytic events the Kongregate SDK automatically fires.
Most games will not need to listen for these events. It's useful if you wish to echo the events to your own analytics collection system.
gameObject | An active GameObject |
listener | the delegate to be notified of the events. |
void Kongregate.IAnalytics.SetCommonProperties | ( | Dictionary< string, object > | props | ) |
Sets the common properties from a dictionary.
The allowed types for the dictionary are the same as AddEvent.
void Kongregate.IAnalytics.SetCommonPropsCallback | ( | delegateGetCommonProperties | callback | ) |
Set the common properties callback.
If set, this method is invoked when events are added.
callback | The delegate to be called to collect common properties |
void Kongregate.IAnalytics.SetDeltaButtonListener | ( | Analytics.ButtonActionListener | listener | ) |
Sets the callback listener for Delta in-app messages Will be invoked when a deep link is selected as the message Action.
gameObjectName | the game object to handle the action |
functionName | the function on the game object that will be invoked |
void Kongregate.IAnalytics.SetDeltaParameterListener | ( | Analytics.ParameterListener | listener | ) |
Sets the callback listener for Delta event recording.
gameObjectName | the game object to handle the action |
functionName | the function on the game object that will be invoked |
void Kongregate.IAnalytics.SetFilterType | ( | string | filterType | ) |
Deprecated.
void Kongregate.IAnalytics.SetPushToken | ( | string | token | ) |
Notifies adjust the device token for iOS and firebase push token for Android.
When set and configured on the Adjust dashboard, Adjust will track uninstall and re-install events.
token | The Firebase push token for Android or the base64 encoded device token for iOS |
void Kongregate.IAnalytics.SetSwrveButtonListener | ( | string | gameObjectName, |
string | functionName | ||
) |
Sets the callback listener for Swrve in-app messages (http://docs.swrve.com/user-documentation/in-app-messaging/).
Will be invoked when a deep link is selected as the message Action.
gameObjectName | the game object to handle the action |
functionName | the function on the game object that will be invoked |
void Kongregate.IAnalytics.Start | ( | ) |
When using KongregateSettings.DeferAnalytics, this allows you to start the analytics subsystem.
You should attempt to call this function as quickly as possible after initializing the SDK, or you may miss events.
void Kongregate.IAnalytics.StartDeltaDNA | ( | ) |
Internal method to start Unity DeltaDNA analytics separately.
Will fail if Kong Analytics has not yet been initialized.
void Kongregate.IAnalytics.StartPurchase | ( | string | productID, |
int | quantity, | ||
Dictionary< string, object > | gameFields | ||
) |
Creates an Adjust/Swrve iap_attemps event.
The SKU must match the one set up in the iTunes Connect portal, and must contain the pricing tier, such as: t05_hard.
Be careful not to start multiple purchase flows at once. Disable the UI that initiates the purchase flow until it's complete or cancelled.
productID | The product ID |
quantity | The quantity of items purchased |
gameFields | An optional dictionary containing custom event fields to pass along |
void Kongregate.IAnalytics.StartPurchase | ( | string | productID, |
int | quantity, | ||
string | gameFieldsJson | ||
) |
Creates an Adjust/Swrve iap_attemps event.
The SKU must match the one set up in the iTunes Connect portal, and must contain the pricing tier, such as: t05_hard.
Be careful not to start multiple purchase flows at once. Disable the UI that initiates the purchase flow until it's complete or cancelled.
productID | The product ID |
quantity | The quantity of items purchased |
gameFieldsJson | An optional JSON string containing custom event fields to pass along |
void Kongregate.IAnalytics.TrackPurchase | ( | string | productID, |
int | quantity | ||
) |
Deprecated.
void Kongregate.IAnalytics.TrackPurchase | ( | string | productID, |
int | quantity, | ||
Dictionary< string, object > | fields | ||
) |
Deprecated.
void Kongregate.IAnalytics.UpdateCommonProps | ( | ) |
Manually run the common properties delegate to update the properties.
In general you should not need to call this