Keewano Unity SDK
|
Static Public Member Functions | |
static void | SetUserConsent (bool consentGiven) |
Sets the user's consent for data collection and analytics. | |
static Guid | GetInstallId () |
Retrieves the unique installation ID for the game. | |
static void | ReportButtonClick (string buttonName) |
Reports a button click event. | |
static void | ReportWindowOpen (string windowName) |
Reports a window/popup open event. | |
static void | ReportWindowClose (string windowName) |
Reports a window/popup close event. | |
static void | ReportInAppPurchase (string productName, uint priceUsdCents) |
Reports an in-app purchase event. | |
static void | ReportInstallCampaign (string campaignName) |
Reports a marketing install campaign for this user. | |
static void | ReportGameLanguage (string language) |
Reports the game language. | |
static void | ReportOnboardingMilestone (string milestoneName) |
Report that a user has reached a milestone during the onboarding (game tutorial) process. | |
static void | ReportABTestGroupAssignment (string testName, char group) |
Marks the user as a participant in an specific test group. | |
static void | ReportItemsExchange (string exchangeLocation, Item[] from, Item[] to) |
Reports an item exchange event using item arrays. | |
static void | ReportItemsExchange (string exchangeLocation, ReadOnlySpan< Keewano.Item > from, ReadOnlySpan< Keewano.Item > to) |
Reports an item exchange event using read-only spans. | |
static void | SetUserId (UInt64 uid) |
Sets the user identifier using a UInt64 value. | |
static void | SetUserId (Guid uid) |
Sets the user identifier using a Guid. | |
static void | ReportItemsReset (string location, Item[] items) |
Resets the user's items at a specified location. | |
static void | MarkAsTestUser (string testerName) |
Marks the device as a test user. | |
static void | LogError (string message) |
Reports a technical issue encountered during gameplay. | |
|
static |
Retrieves the unique installation ID for the game.
KeewanoSDK generates a unique ID for each game installation, enabling anonymous tracking of events from the same installation while ensuring compliance with privacy policies such as GDPR and CCPA.
To associate the installation with your in-game user ID, use the SetUserId
method.
|
static |
Reports a technical issue encountered during gameplay.
Use this method to log any additional or custom errors that may not be captured by the system. This is particularly useful for recording issues unique to your application's behavior. Keewano AI automatically gathers exceptions and Unity error log messages.
|
static |
Marks the device as a test user.
Marking a device as a test user allows Keewano AI to ignore any unusual behavior and bugs reported from it during statistics calculations and investigations. This is especially useful during game testing and integrations.
Use this to:
Usage:
|
static |
Marks the user as a participant in an specific test group.
A/B testing is a technique used to compare two or more versions of a feature to see which one performs better. In game development, this helps you understand which changes improve gameplay, player satisfaction, or overall balance.
When you assign users to test groups, you can compare how different versions of a feature perform with real players. For example, you might test different reward systems or control schemes by splitting your players into groups, then analyze their behavior and feedback to make data-driven improvements.
|
static |
Reports a button click event.
KeewanoSDK automatically collects button click events when using Unity.UI system, capturing the button GameObject names to infer user actions. However, if your game uses a custom UI subsystem or if certain interactive objects—treated as buttons during gameplay but not implemented as standard Unity.UI, use this method to manually report those button clicks.
|
static |
Reports the game language.
This method logs the game's language setting. While the SDK automatically collects the system language, this method is useful for detecting cases where the game language differs from the system language, which may indicate that the language was manually changed by the user or that the game lacks proper localization.
|
static |
Reports an in-app purchase event.
Use this method to log an in-app purchase by specifying the product name and the price in US cents. This event helps track purchase activity within the Keewano system for further analysis and reporting.
|
static |
Reports a marketing install campaign for this user.
This method logs the marketing campaign that was used to acquire the user into the game. It is used to compare the performance of different marketing sources and their effectiveness in driving user acquisitions.
|
static |
Reports an item exchange event using item arrays.
This function notifies the system of an item exchange event occurring at a specified location. The 'from' items represent those deducted from the user's balance, while the 'to' items represent those added. For one-sided transactions, pass null for the corresponding parameter.
exchangeLocation | The location or context of the item exchange. |
from | An array of items to be removed from the user's balance (can be null). |
to | An array of items to be added to the user's balance (can be null). |
|
static |
Reports an item exchange event using read-only spans.
This function notifies the system of an item exchange event occurring at a specified location. The 'from' items represent those deducted from the user's balance, while the 'to' items represent those added. For one-sided transactions, pass an empty span for the corresponding parameter.
exchangeLocation | The location or context of the item exchange. |
from | A read-only span of items to be removed from the user's balance. |
to | A read-only span of items to be added to the user's balance. |
|
static |
Resets the user's items at a specified location.
This function notifies the system to reset the user's items at the given location, typically used to initialize or correct the user's item balance.
|
static |
Report that a user has reached a milestone during the onboarding (game tutorial) process.
The data reported using this method will be used to automatically generate an FTUE (first-time user experience) funnel for your players and will be used by our AI to investigate the behavior of users who are churning during the onboarding process.
|
static |
Reports a window/popup close event.
This method is used to capture the event when a window or popup is closed, helping to understand the context and scope of the user's actions.
|
static |
Reports a window/popup open event.
This method is used to capture the event when a window or popup is opened, helping to understand the context and scope of the user's actions.
|
static |
Sets the user's consent for data collection and analytics.
This method is used to inform the KeewanoSDK whether the player has granted or denied consent for data collection, in compliance with privacy regulations such as GDPR and CCPA.
If the "Require Player Consent" option is enabled, the SDK will buffer analytics data locally until you call this method:
SetUserConsent(true)
, all buffered data will be sent to the server, and the SDK will continue to collect and send analytics data from that point onward.SetUserConsent(false)
, all buffered data will be discarded and no further data will be collected or sent.If the "Require Player Consent" option is disabled, the SDK will start collecting and sending data automatically on app launch.
consentGiven | Pass true if the player has granted consent for data collection, or false if the player has denied consent. |
Usage:
KeewanoSDK.SetUserConsent(true)
or KeewanoSDK.SetUserConsent(false)
based on the player's choice.
|
static |
Sets the user identifier using a Guid.
The method is for setting the user identifier, which is used to correlate a player's behavior in the Keewano system with the corresponding user in the game systems.
Use the UInt64 version for numeric user identifiers or the Guid version if you are using Guids.
|
static |
Sets the user identifier using a UInt64 value.
The method is for setting the user identifier, which is used to correlate a player's behavior in the Keewano system with the corresponding user in the game systems.
Use the UInt64 version for numeric user identifiers or the Guid version if you are using Guids.