fix analytics function not starting
diff --git a/server/index.js b/server/index.js
index 52cb910..fd3f934 100644
--- a/server/index.js
+++ b/server/index.js
@@ -50,7 +50,7 @@
       }
     );
 
-    ctx.waitUntil(async function () {
+    ctx.waitUntil((async function () {
       //Log analytics event
       if (
         url.pathname.startsWith("/scripts/lms/")
@@ -60,7 +60,7 @@
       ) {
         logAnalyticsEvent(url, request, env, ctx);
       }
-    });
+    })());
 
     return res;
   } catch (e) {