Skip to content

Commit

Permalink
add fathom event tracking for playground
Browse files Browse the repository at this point in the history
  • Loading branch information
mglaman committed Nov 21, 2023
1 parent 4192276 commit 96a7802
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
async function doAnalyse(saveResult) {
result = null;
processing = true;
if (typeof window.fathom !== 'undefined') {
window.fathom.trackEvent('analyse code');
}
try {
const response = await fetch(`${apiUrl}/analyse`, {
method: 'POST',
Expand Down Expand Up @@ -155,6 +158,9 @@
} else if (typeof window.navigator.clipboard !== 'undefined') {
await window.navigator.clipboard.writeText(window.location.href);
}
if (typeof window.fathom !== 'undefined') {
window.fathom.trackEvent('shared result');
}
}
</script>
<svelte:head>
Expand Down

0 comments on commit 96a7802

Please sign in to comment.