Unity 加入Fabric统计自定义事件

demo


统计

统计按钮点击

// 点击周
        Answers.LogCustom(
            "Click_Buy",
            customAttributes: new Dictionary<string, object> (){
                {"Click_Buy_Button", "ClickWeekly"}
            }
        );

//点击 月
        Answers.LogCustom(
            "Click_Buy",
            customAttributes: new Dictionary<string, object> (){
                {"Click_Buy_Button", "ClickYearly"}
            }
        );

// 点击 年
        Answers.LogCustom(
            "Click_Buy",
            customAttributes: new Dictionary<string, object> (){
                {"Click_Buy_Button", "ClickYearly"}
            }
        );


统计购物车点击
key:Click_Cart

Click_Cart_From
类别:顶部 Main_Top_Cart

     单个 Item_Cart

//购买From
        Answers.LogCustom(
            "Click_Cart",
            customAttributes: new Dictionary<string, object> (){
                {"Click_Cart_From", "Main_Top_Cart"}
            }
        );


//购买From
        Answers.LogCustom(
            "Click_Cart",
            customAttributes: new Dictionary<string, object> (){
                {"Click_Cart_From", "Item_Cart"}
            }
        );


统计购买成功

标志: BuySuccess
成功类型:PurchaseType
分:weekly,monthly,yearly

//购买成功统计
        string _Purchase_Type = "weekly";
        if(type == 0){
            _Purchase_Type = "weekly";
        } else if(type == 1){
            _Purchase_Type = "monthly";
        } else if(type == 2){
            _Purchase_Type = "monthly";
        }

        Answers.LogCustom(
            "BuySuccess",
            customAttributes: new Dictionary<string, object> (){
                {"PurchaseType", _Purchase_Type}
            }
        );
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容