fix(insights): privacy fix
This commit is contained in:
@@ -89,7 +89,10 @@ export default class Settings {
|
||||
this.#doNotTrack = doNotTrack
|
||||
if (this.#doNotTrack) return
|
||||
try {
|
||||
window.umami?.track(props => ({ ...props, url: `/${import.meta.env.VITE_LINK}${isWallpaperEngine ? "?steam" : ""}` }));
|
||||
window.umami?.track(props => ({
|
||||
...props,
|
||||
url: `/${import.meta.env.VITE_LINK}${isWallpaperEngine ? "?steam" : ""}`
|
||||
}));
|
||||
} catch(e) {
|
||||
console.warn && console.warn(e.message)
|
||||
}
|
||||
@@ -97,9 +100,12 @@ export default class Settings {
|
||||
|
||||
functionInsights(functionName, toSkip = false) {
|
||||
if (!this.#isInsightsInited || this.#doNotTrack || import.meta.env.MODE === 'development' || functionName === this.#lastFunctionInsights || toSkip) return
|
||||
this.#lastFunctionInsights = functionName
|
||||
try {
|
||||
window.umami?.track(`${functionName}`);
|
||||
window.umami?.track(props => ({
|
||||
...props,
|
||||
name: `${functionName}`,
|
||||
url: `/${import.meta.env.VITE_LINK}${this.isWallpaperEngine ? "?steam" : ""}`
|
||||
}));
|
||||
} catch (e) {
|
||||
console.warn && console.warn(e.message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user