| | 1 | | using System.Collections.Generic; |
| | 2 | | using System.Linq; |
| | 3 | | using DCL.Interface; |
| | 4 | | using Newtonsoft.Json; |
| | 5 | |
|
| | 6 | | /// <summary> |
| | 7 | | /// For the events we use the convention of all lower cases and "_" instead of space |
| | 8 | | /// </summary> |
| | 9 | | public class Analytics : IAnalytics |
| | 10 | | { |
| | 11 | | private static bool VERBOSE = false; |
| | 12 | |
|
| | 13 | | public void SendAnalytic(string eventName, Dictionary<string, string> data) |
| | 14 | | { |
| 0 | 15 | | if (VERBOSE) |
| 0 | 16 | | UnityEngine.Debug.Log($"{eventName}:\n{JsonConvert.SerializeObject(data, Formatting.Indented)}"); |
| | 17 | |
|
| 0 | 18 | | SendToSegment(eventName, data); |
| 0 | 19 | | } |
| | 20 | |
|
| 0 | 21 | | internal void SendToSegment(string eventName, Dictionary<string, string> data) { WebInterface.ReportAnalyticsEvent(e |
| | 22 | |
|
| 72 | 23 | | public void Dispose() { } |
| | 24 | | } |