public static AnalyticsResult Custom(string eventName, IDictionary <string, object> eventData = null)
        {
            AnalyticsResult analyticsResult = AnalyticsResult.UnsupportedPlatform;
            string          text            = string.Empty;

            if (string.IsNullOrEmpty(eventName))
            {
                AnalyticsEvent.OnValidationFailed("Custom event name cannot be set to null or an empty string.");
            }
            if (eventData == null)
            {
                analyticsResult = Analytics.CustomEvent(eventName);
            }
            else
            {
                analyticsResult = Analytics.CustomEvent(eventName, eventData);
            }
            if (AnalyticsEvent.debugMode)
            {
                if (eventData == null)
                {
                    text += "\n  Event Data (null)";
                }
                else
                {
                    text += string.Format("\n  Event Data ({0} params):", eventData.Count);
                    foreach (KeyValuePair <string, object> keyValuePair in eventData)
                    {
                        text += string.Format("\n    Key: '{0}';  Value: '{1}'", keyValuePair.Key, keyValuePair.Value);
                    }
                }
            }
            switch (analyticsResult)
            {
            case AnalyticsResult.Ok:
                if (AnalyticsEvent.debugMode)
                {
                    Debug.LogFormat("Successfully sent '{0}' event (Result: '{1}').{2}", new object[]
                    {
                        eventName,
                        analyticsResult,
                        text
                    });
                }
                return(analyticsResult);

            default:
                if (analyticsResult != AnalyticsResult.InvalidData)
                {
                    Debug.LogWarningFormat("Unable to send '{0}' event (Result: '{1}').{2}", new object[]
                    {
                        eventName,
                        analyticsResult,
                        text
                    });
                    return(analyticsResult);
                }
                break;

            case AnalyticsResult.TooManyItems:
                break;
            }
            Debug.LogErrorFormat("Failed to send '{0}' event (Result: '{1}').{2}", new object[]
            {
                eventName,
                analyticsResult,
                text
            });
            return(analyticsResult);
        }