< Summary

Class:DCL.MyAccount.MyAccountAnalyticsService
Assembly:MyAccountHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/MyAccountHUD/MyAccountAnalyticsService.cs
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:102
Line coverage:0% (0 of 26)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:9
Method coverage:0% (0 of 9)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
MyAccountAnalyticsService(...)0%2100%
SendPlayerSwapNameAnalytic(...)0%2100%
SendPlayerOpenClaimNameAnalytic()0%2100%
SendPlayerWalletBuyManaAnalytic(...)0%2100%
SendProfileInfoEditAnalytic(...)0%2100%
SendProfileInfoAdditionalInfoAddAnalytic(...)0%2100%
SendProfileInfoAdditionalInfoRemoveAnalytic(...)0%2100%
SendProfileLinkAddAnalytic(...)0%2100%
SendProfileLinkRemoveAnalytic(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/MyAccountHUD/MyAccountAnalyticsService.cs

#LineLine coverage
 1using System.Collections.Generic;
 2
 3namespace DCL.MyAccount
 4{
 5    public class MyAccountAnalyticsService : IMyAccountAnalyticsService
 6    {
 7        private const string PLAYER_SWAP_NAME = "player_swap_name";
 8        private const string PLAYER_OPEN_CLAIM_NAME = "player_open_claim_name";
 9        private const string WALLET_BUY_ETHEREUM_MANA = "player_wallet_buy_mana";
 10        private const string PROFILE_INFO_EDIT = "profile_info_edit";
 11        private const string PROFILE_INFO_ADDITIONAL_INFO_ADD = "profile_info_additional_info_add";
 12        private const string PROFILE_INFO_ADDITIONAL_INFO_REMOVE = "profile_info_additional_info_remove";
 13        private const string PROFILE_LINK_ADD = "profile_link_add";
 14        private const string PROFILE_LINK_REMOVE = "profile_link_remove";
 15
 16        private readonly IAnalytics analytics;
 17
 018        public MyAccountAnalyticsService(IAnalytics analytics)
 19        {
 020            this.analytics = analytics;
 021        }
 22
 23        public void SendPlayerSwapNameAnalytic(bool claimed, int totalNames)
 24        {
 025            Dictionary<string, string> data = new Dictionary<string, string>
 26            {
 27                { "claimed", claimed.ToString() },
 28                { "total_names", totalNames.ToString() },
 29            };
 30
 031            analytics.SendAnalytic(PLAYER_SWAP_NAME, data);
 032        }
 33
 34        public void SendPlayerOpenClaimNameAnalytic()
 35        {
 036            analytics.SendAnalytic(PLAYER_OPEN_CLAIM_NAME, null);
 037        }
 38
 39        public void SendPlayerWalletBuyManaAnalytic(bool isPolygonNetwork)
 40        {
 041            Dictionary<string, string> data = new Dictionary<string, string>
 42            {
 43                { "is_polygon_network", isPolygonNetwork.ToString() },
 44            };
 45
 046            analytics.SendAnalytic(WALLET_BUY_ETHEREUM_MANA, data);
 047        }
 48
 49        public void SendProfileInfoEditAnalytic(int lenght)
 50        {
 051            Dictionary<string, string> data = new Dictionary<string, string>
 52            {
 53                { "lenght", lenght.ToString() },
 54            };
 55
 056            analytics.SendAnalytic(PROFILE_INFO_EDIT, data);
 057        }
 58
 59        public void SendProfileInfoAdditionalInfoAddAnalytic(string type, string value)
 60        {
 061            Dictionary<string, string> data = new Dictionary<string, string>
 62            {
 63                { "type", type },
 64                { "value", value },
 65            };
 66
 067            analytics.SendAnalytic(PROFILE_INFO_ADDITIONAL_INFO_ADD, data);
 068        }
 69
 70        public void SendProfileInfoAdditionalInfoRemoveAnalytic(string type)
 71        {
 072            Dictionary<string, string> data = new Dictionary<string, string>
 73            {
 74                { "type", type },
 75            };
 76
 077            analytics.SendAnalytic(PROFILE_INFO_ADDITIONAL_INFO_REMOVE, data);
 078        }
 79
 80        public void SendProfileLinkAddAnalytic(string name, string url)
 81        {
 082            Dictionary<string, string> data = new Dictionary<string, string>
 83            {
 84                { "name", name },
 85                { "url", url },
 86            };
 87
 088            analytics.SendAnalytic(PROFILE_LINK_ADD, data);
 089        }
 90
 91        public void SendProfileLinkRemoveAnalytic(string name, string url)
 92        {
 093            Dictionary<string, string> data = new Dictionary<string, string>
 94            {
 95                { "name", name },
 96                { "url", url },
 97            };
 98
 099            analytics.SendAnalytic(PROFILE_LINK_REMOVE, data);
 0100        }
 101    }
 102}