Пример #1
0
 /// <summary>
 /// Track event, first ensure Analytics has been init
 /// </summary>
 public void TrackEvent(string eventName, params Parameter[] parameters)
 {
     if (Instance == null)
     {
         eventsQueue.Enqueue(eventName);
     }
     else
     {
         AnalyticsLogger.TrackEvent(eventName, parameters);
     }
 }
Пример #2
0
    /// <summary>
    /// If anything has been queued of events/scene tracking before singleton initiation, track everything that has been accumulated in the queue.
    /// </summary>
    public void init()
    {
        AnalyticsLogger.OnSession();

        while (scenesQueue.Count > 0)
        {
            AnalyticsLogger.TrackScene(scenesQueue.Dequeue());
        }

        while (eventsQueue.Count > 0)
        {
            AnalyticsLogger.TrackEvent(eventsQueue.Dequeue());
        }
    }