36c7bf6775818acf0f16d1875e89fe5e8450cc7d
chmalee
  Thu Jul 27 12:46:44 2023 -0700
Log when users start and end the tutorial, refs Jairo email

diff --git src/hg/js/tutorial.js src/hg/js/tutorial.js
index 9f26862..597fb2d 100644
--- src/hg/js/tutorial.js
+++ src/hg/js/tutorial.js
@@ -4,46 +4,53 @@
   return selectedOption;
 }
 
 
 const tour = new Shepherd.Tour({
   defaultStepOptions: {
     cancelIcon: {
       enabled: true
     },
     classes: 'class-1 class-2',
     scrollTo: { behavior: 'smooth', block: 'center' }
   },
   useModalOverlay: true
 });
 
+// log when a tutorial is started
+tour.on('start', function() {
+    writeToApacheLog("tutorial start " + getHgsid());
+});
+
 var tutorialButtons = {
     'back': {
         action() {
             return this.back();
         },
         classes: 'shepherd-button-secondary',
         text: 'Back'
     },
     'next': {
         action() {
             return this.next();
         },
         text: 'Next'
     },
     'end': {
         action() {
+            // log when the tutorial is finished
+            writeToApacheLog("tutorial finish " + getHgsid());
             localStorage.setItem("hgTracks_hideTutorial", "1");
             return this.complete();
         },
         classes: 'shepherd-button-secondary',
         text: 'Finish'
     }
 };
 
 /* Wrapping the tutorial steps and fuctions to only execute after the page loads*/
 window.onload = function() {
   function selectMiddleButton() {
     var hgTracksTable = document.getElementById('imgTbl');
     var rowCount = hgTracksTable.rows.length;
     var middleIndex = Math.floor(rowCount / 2);