Economy
The player bought, sold or exchanged something in the game
Name
Type
Select
Backend name
Description
Override #1
Name
Type
Select
Backend name
Description
Code examples:
Example-1: When something received
// Build Product object
Product productReceived = new Product
{
virtualCurrencies = new List<VirtualCurrency>
{
// virtualCurrencyName: "coin", virtualCurrencyType: "soft", virtualCurrencyAmount: 5
new VirtualCurrency("coin", "soft", 5)
},
items = new List<Item>() // none
// realCurrency = null (not used)
};
// Transaction Object with productReceived
Transaction transactionN = new Transaction(
name : "claim_daily_reward_0",
spent: null,
received : productReceived,
productID : null,
transactionID : null);
// Missiondata can be added inside AdditionData
Dictionary<string, object> additionalData = new Dictionary<string, object>
{
{ "mission_data", new Dictionary<string, object>
{
{ "mission_type", "main" },
{ "mission_name", "main_" },
{ "mission_id", 2 },
{ "mission_attempt", 10},
}
}
};
LionAnalytics.Economy(
transaction: transaction,
placement: "daily_reward_screen",
additionalData: additionalData);Example-2: When something spent
Example-3: When something spent and in return soemthing is received
Last updated
Was this helpful?