diff --git a/Runtime/Code/SDK/GuruSDK.Ads.cs b/Runtime/Code/SDK/GuruSDK.Ads.cs index ee3bd3c..85fa85f 100644 --- a/Runtime/Code/SDK/GuruSDK.Ads.cs +++ b/Runtime/Code/SDK/GuruSDK.Ads.cs @@ -539,6 +539,7 @@ namespace Guru } #endregion + } diff --git a/Runtime/Code/SDK/GuruSDK.Analytics.cs b/Runtime/Code/SDK/GuruSDK.Analytics.cs index decb74f..435185f 100644 --- a/Runtime/Code/SDK/GuruSDK.Analytics.cs +++ b/Runtime/Code/SDK/GuruSDK.Analytics.cs @@ -613,6 +613,7 @@ namespace Guru /// 当前关卡或者人物等级名称 /// 购买道具名称 /// 购买场景如 Store, Workbench, Sign, Ads.... + /// 自定义数据 public static void LogEarnVirtualCurrency(string currencyName, int value, int balance, string category = "", string itemName = "", @@ -621,19 +622,55 @@ namespace Guru Analytics.EarnVirtualCurrency(currencyName, value, balance, category, itemName,levelName, scene, extra); } + /// + /// 游戏初次启动/用户获得初始道具 + /// + /// 货币名称 + /// 货币增加值 10 + /// 结算后货币总量 20 -> 30 + /// 购入道具 ID / 道具名称 + /// 购买场景如 Store, Workbench, Sign, Ads.... + /// 自定义数据 + public static void LogEarnVirtualCurrencyByFirstOpen(string currencyName, + int value, int balance, + string levelName = "", string scene = "", Dictionary extra = null) + { + string item_category = Consts.CurrencyCategoryReward; + string item_name = "first_open"; + Analytics.EarnVirtualCurrency(currencyName, value, balance, item_category, item_name,levelName, scene, extra); + } + + /// + /// 出售道具后获取货币 + /// + /// 货币名称 + /// 货币增加值 10 + /// 结算后货币总量 20 -> 30 + /// 购买道具名称 + /// 当前关卡或者人物等级名称 + /// 购买场景如 Store, Workbench, Sign, Ads.... + /// 自定义数据 + public static void LogEarnVirtualCurrencyBySellItem(string currencyName, + int value, int balance, string itemName, + string levelName = "", string scene = "", Dictionary extra = null) + { + string item_category = Consts.CurrencyCategoryIGC; + Analytics.EarnVirtualCurrency(currencyName, value, balance, item_category, itemName,levelName, scene, extra); + } /// /// 赚取组合: 货币+道具 (earn_virtual_currency) (props) /// - /// - /// - /// - /// - /// - /// - /// - /// + /// 货币名称 + /// 货币增加值 10 + /// 结算后货币总量 20 -> 30 + /// 消耗类型, 默认值请赋 reward + /// 购买道具名称 + /// 获取的道具组合 + /// 当前关卡或者人物等级名称 + /// 购买场景如 Store, Workbench, Sign, Ads.... + /// 自定义数据 private static void LogEarnVirtualCurrencyAndProps(string currencyName, int value = 0, int balance = 0, string category = "", string itemName = "", @@ -847,6 +884,24 @@ namespace Guru } + /// + /// 消耗 Boost 道具 + /// + /// 货币/道具名称 + /// 货币消耗值 10 + /// 结算后货币总量 30 -> 20 + /// + /// + /// + /// + /// + public static void LogSpendVirtualCurrencyBoost(string currencyName, int value, int balance, string itemName = "", + string levelName = "", string scene = "", Dictionary extra = null) + { + string item_category = "boost"; + Analytics.SpendVirtualCurrency(currencyName, value, balance, item_category, itemName, levelName, scene, extra); + } + /// /// 消耗货币购买道具 (spend_virtual_currency) (props) ///