From a6507d44aa897920e7a71107dcba04e9262b3679 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt <coryd@hey.com> Date: Sun, 24 Mar 2024 15:31:27 -0700 Subject: [PATCH] chore: eventing --- api/event.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/event.js b/api/event.js index 04231a9e..85139d90 100644 --- a/api/event.js +++ b/api/event.js @@ -19,8 +19,8 @@ export default async (request, context) => { "Authorization": `Bearer ${FATHOM_KEY}` }, }) - .then(() => {}) - .catch(() => {}) + .then((data) => console.log(data)) + .catch((err) => console.log(err)) } if (ig) return; @@ -31,10 +31,10 @@ export default async (request, context) => { if (!userId) await ids.set(id, id) const idVal = await ids.get(id) url = `https://cdn.usefathom.com/?h=${encodeURIComponent(page)}&sid=CWSVCDJC&cid=${idVal}` - fathomEvent(`no-script-visit-id: ${idVal}`) + await fathomEvent(`no-script-visit-id: ${idVal}`) } else { url = `https://cdn.usefathom.com/?h=${encodeURIComponent(page)}&sid=CWSVCDJC&cid=${num}` - fathomEvent(`blocked-visit-id: ${num}`) + await fathomEvent(`blocked-visit-id: ${num}`) } fetch(url, { headers })