美文网首页 移动 前端 Python Android Java
Unity 加入Fabric统计自定义事件

Unity 加入Fabric统计自定义事件

作者: zcwfeng | 来源:发表于2017-09-30 13:56 被阅读57次

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}
            }
        );

相关文章

网友评论

    本文标题:Unity 加入Fabric统计自定义事件

    本文链接:https://www.haomeiwen.com/subject/ebwgextx.html