public TutorialAnalyticsEventData(string tutorialName, string version, TutorialConclusion conclusion, string lessonID)
 {
     this.tutorialName = tutorialName;
     this.version      = version;
     this.conclusion   = conclusion;
     this.lessonID     = lessonID;
 }
 internal static void TutorialEnded(TutorialConclusion conclusion)
 {
     if (Instance.currentTutorial == null)
     {
         DebugWarning("TutorialEnded Ignored because no tutorial is set");
         return;
     }
     if (conclusion == TutorialConclusion.Completed)
     {
         PageShown(Instance.lastPage, Instance.lastPageIndex + 1);  // "Show" a dummy page to get the last page to report
     }
     if (Instance.currentTutorial.ProgressTrackingEnabled)
     {
         SendTutorialEvent(
             Instance.currentTutorial.name, Instance.currentTutorial.Version, conclusion,
             Instance.currentTutorial.LessonId, Instance.currentTutorialStartTime,
             DateTime.UtcNow - Instance.currentTutorialStartTime, false
             );
     }
     DebugLog("Tutorial Ended: " + conclusion);
     if (conclusion == TutorialConclusion.Quit)
     {
         Instance.currentTutorial = null;
     }
 }
Exemplo n.º 3
0
        internal static void TutorialEnded(TutorialConclusion conclusion)
        {
            if (Instance.currentTutorial == null)
            {
                DebugWarning("TutorialEnded Ignored because no tutorial is set");
                return;
            }
            if (conclusion == TutorialConclusion.Completed)
            {
                PageShown(Instance.lastPage, Instance.lastPageIndex + 1);  // "Show" a dummy page to get the last page to report
            }
            var data = new TutorialAnalyticsEventData(Instance.currentTutorial.name, Instance.currentTutorial.version, conclusion, Instance.currentTutorial.lessonId);

            UsabilityAnalyticsProxy.SendEvent("tutorial", Instance.currentTutorialStartTime, DateTime.UtcNow - Instance.currentTutorialStartTime, false, data);
            DebugLog("Tutorial Ended");
            Instance.currentTutorial = null;
        }
        public static AnalyticsResult SendTutorialEvent(string tutorialName, string version, TutorialConclusion conclusion, string lessonID, DateTime startTime, TimeSpan duration, bool isBlocking)
        {
            if (!EditorAnalytics.enabled || !RegisterEvent(k_EventTutorial))
            {
                return(AnalyticsResult.AnalyticsDisabled);
            }
            var data = new TutorialEventData
            {
                ts           = DateTime.UtcNow.Millisecond,
                tutorialName = tutorialName,
                version      = version,
                conclusion   = (int)conclusion,
                lessonID     = lessonID,
                duration     = duration.Milliseconds,
                startTime    = startTime.Millisecond,
                isBlocking   = isBlocking
            };

            return(SendEvent(k_EventTutorial, data));
        }