-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5a6827
commit 0c12866
Showing
14 changed files
with
116 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export default function useTracking(elementName: MaybeRefOrGetter<string>, additionalData: MaybeRefOrGetter<Record<string, MaybeRefOrGetter<unknown>>> = {}) { | ||
return { | ||
click: (e: MouseEvent) => track("click", elementName, additionalData), | ||
change: (e: MouseEvent) => track("change", elementName, additionalData), | ||
}; | ||
} | ||
|
||
export function track(type: string, elementName: MaybeRefOrGetter<string>, additionalData: MaybeRefOrGetter<Record<string, MaybeRefOrGetter<unknown>>> = {}) { | ||
if (import.meta.server) return; | ||
const name = toValue(elementName); | ||
const data: Record<string, unknown> = { type }; | ||
for (const [k, v] of Object.entries(toValue(additionalData))) { | ||
data[k] = toValue(v); | ||
} | ||
data["type"] = type; | ||
window.umami.track(name, data); | ||
} | ||
|
||
export function identify() { | ||
if (import.meta.server) return; | ||
const authStore = useAuthStore(); | ||
const settingsStore = useSettingsStore(); | ||
const i18n = useNuxtApp().$i18n; | ||
|
||
const props: Record<string, unknown> = {}; | ||
props.user = authStore.user ? authStore.user.name : "<anonymous>"; | ||
props.theme = settingsStore.darkMode ? "dark" : "light"; | ||
props.language = i18n.locale.value; | ||
window.umami.identify(props); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,11 @@ Cloudflare | |
This Website is protected by various Cloudflare technologies. You can view their Privacy Policy here: https://www.cloudflare.com/privacypolicy/ | ||
Sentry | ||
---------- | ||
This Website uses Sentry for error tracking. You can view their Privacy Policy here: https://sentry.io/privacy/ | ||
Changes to this Privacy Policy | ||
------------------------------ | ||
|
@@ -120,7 +125,7 @@ Contact Us | |
If you have any questions about this Privacy Policy, You can contact Us via email at [email protected]. | ||
Last updated: December 25, 2022 | ||
Last updated: December 23, 2024 | ||
`; | ||
useSeo(computed(() => ({ title: i18n.t("pages.privacypolicyTitle"), route }))); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters