mirror of https://github.com/VERT-sh/VERT.git
feat: add analytics for conversions
This commit is contained in:
parent
c22555f26b
commit
86724cdeae
|
|
@ -91,6 +91,7 @@
|
||||||
navbar?.addEventListener("mouseleave", mouseLeave);
|
navbar?.addEventListener("mouseleave", mouseLeave);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
window.plausible =
|
window.plausible =
|
||||||
window.plausible ||
|
window.plausible ||
|
||||||
((_, opts) => {
|
((_, opts) => {
|
||||||
|
|
@ -98,6 +99,7 @@
|
||||||
status: 200,
|
status: 200,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|
@ -108,7 +110,7 @@
|
||||||
{#if PUB_PLAUSIBLE_URL}<script
|
{#if PUB_PLAUSIBLE_URL}<script
|
||||||
defer
|
defer
|
||||||
data-domain={PUB_HOSTNAME || "vert.sh"}
|
data-domain={PUB_HOSTNAME || "vert.sh"}
|
||||||
event-theme={theme.dark ? "dark" : "light"}
|
event-Theme={theme.dark ? "dark" : "light"}
|
||||||
src="{PUB_PLAUSIBLE_URL}/js/script.pageview-props.tagged-events.js"
|
src="{PUB_PLAUSIBLE_URL}/js/script.pageview-props.tagged-events.js"
|
||||||
></script>{/if}
|
></script>{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,12 @@
|
||||||
promises.push(
|
promises.push(
|
||||||
(async (i) => {
|
(async (i) => {
|
||||||
await convert(files.files[i], i);
|
await convert(files.files[i], i);
|
||||||
|
window.plausible("Convert", {
|
||||||
|
props: {
|
||||||
|
"Format from": files.files[i].from,
|
||||||
|
"Format to": files.files[i].to,
|
||||||
|
},
|
||||||
|
});
|
||||||
})(i),
|
})(i),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue