mirror of https://github.com/VERT-sh/VERT.git
feat: add analytics for conversions
This commit is contained in:
parent
c22555f26b
commit
86724cdeae
|
@ -91,13 +91,15 @@
|
|||
navbar?.addEventListener("mouseleave", mouseLeave);
|
||||
});
|
||||
|
||||
window.plausible =
|
||||
window.plausible ||
|
||||
((_, opts) => {
|
||||
opts?.callback?.({
|
||||
status: 200,
|
||||
onMount(() => {
|
||||
window.plausible =
|
||||
window.plausible ||
|
||||
((_, opts) => {
|
||||
opts?.callback?.({
|
||||
status: 200,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
@ -108,7 +110,7 @@
|
|||
{#if PUB_PLAUSIBLE_URL}<script
|
||||
defer
|
||||
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"
|
||||
></script>{/if}
|
||||
</svelte:head>
|
||||
|
|
|
@ -73,6 +73,12 @@
|
|||
promises.push(
|
||||
(async (i) => {
|
||||
await convert(files.files[i], i);
|
||||
window.plausible("Convert", {
|
||||
props: {
|
||||
"Format from": files.files[i].from,
|
||||
"Format to": files.files[i].to,
|
||||
},
|
||||
});
|
||||
})(i),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue