Ejemplo n.º 1
0
        public static void SendEvent(PageFilters filters)
        {
            var servicesContainer    = ServicesContainer.instance;
            var editorAnalyticsProxy = servicesContainer.Resolve <EditorAnalyticsProxy>();

            if (!editorAnalyticsProxy.RegisterEvent(k_EventName))
            {
                return;
            }

            var filterTab  = PackageManagerWindowAnalytics.GetFilterNameWithSubPage(servicesContainer.Resolve <PackageFiltering>(), servicesContainer.Resolve <PageManager>());
            var orderBy    = filters.isReverseOrder ? $"{filters.orderBy} (reversed)" : filters.orderBy;
            var parameters = new PackageManagerFiltersAnalytics
            {
                filter_tab = filterTab,
                order_by   = orderBy,
                status     = filters.status,
                categories = filters.categories.ToArray(),
                labels     = filters.labels.ToArray()
            };

            editorAnalyticsProxy.SendEventWithLimit(k_EventName, parameters);
        }